<?php
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('frontpage');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('patrolarticle');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('downloads');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('photos');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('search');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('patrolpages');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('profile');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('record');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('mythings');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('addphotoalbum');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('addarticle');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('register');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('help');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('forgot');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('calender');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('mypatrol');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('oldnews');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('points');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('addevent');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('pmmain');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('news');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('subsite');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('forums');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('logon');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('advancements');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('linksdata');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('addpoll');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('polls');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('patrollog');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('statistics');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('rss');";
$sql[] = "INSERT INTO `{$database['prefix']}allowedpages` (`page`) VALUES ('attendance');";

$sql[] = "INSERT INTO `{$database['prefix']}auth` (`id`, `authname`, `level`, `type`) VALUES (26, '-1', 'a:27:{s:13:\"patrolarticle\";i:1;s:12:\"advancements\";i:1;s:8:\"calender\";i:1;s:9:\"downloads\";i:1;s:6:\"forums\";i:1;s:6:\"points\";i:1;s:9:\"linksdata\";i:1;s:9:\"frontpage\";i:1;s:8:\"mypatrol\";i:0;s:8:\"mythings\";i:0;s:6:\"pmmain\";i:0;s:6:\"photos\";i:0;s:10:\"addarticle\";i:0;s:8:\"addevent\";i:0;s:14:\"compostallowed\";i:0;s:7:\"adddown\";i:0;s:7:\"addnews\";i:0;s:8:\"addalbum\";i:0;s:7:\"addpoll\";i:0;s:11:\"sideboxpoll\";i:0;s:7:\"profile\";i:0;s:6:\"search\";i:1;s:14:\"comviewallowed\";i:1;s:6:\"record\";i:0;s:8:\"features\";i:1;s:7:\"support\";i:1;s:7:\"welcome\";i:1;}', 1);";
$sql[] = "INSERT INTO `{$database['prefix']}auth` (`id`, `authname`, `level`, `type`) VALUES (24, '2', 'a:27:{s:13:\"patrolarticle\";i:1;s:12:\"advancements\";i:1;s:8:\"calender\";i:1;s:9:\"downloads\";i:1;s:6:\"forums\";i:1;s:6:\"points\";i:1;s:9:\"linksdata\";i:1;s:9:\"frontpage\";i:1;s:8:\"mypatrol\";i:0;s:8:\"mythings\";i:1;s:6:\"pmmain\";i:1;s:6:\"photos\";i:1;s:10:\"addarticle\";i:0;s:8:\"addevent\";i:0;s:14:\"compostallowed\";i:0;s:7:\"adddown\";i:0;s:7:\"addnews\";i:0;s:8:\"addalbum\";i:0;s:7:\"addpoll\";i:1;s:11:\"sideboxpoll\";i:1;s:7:\"profile\";i:1;s:6:\"search\";i:1;s:14:\"comviewallowed\";i:1;s:6:\"record\";i:0;s:8:\"features\";i:1;s:7:\"support\";i:1;s:7:\"welcome\";i:1;}', 2);";
$sql[] = "INSERT INTO `{$database['prefix']}auth` (`id`, `authname`, `level`, `type`) VALUES (27, '0', 'a:27:{s:13:\"patrolarticle\";i:1;s:12:\"advancements\";i:1;s:8:\"calender\";i:1;s:9:\"downloads\";i:1;s:6:\"forums\";i:1;s:6:\"points\";i:1;s:9:\"linksdata\";i:1;s:9:\"frontpage\";i:1;s:8:\"mypatrol\";i:1;s:8:\"mythings\";i:1;s:6:\"pmmain\";i:1;s:6:\"photos\";i:1;s:10:\"addarticle\";i:1;s:8:\"addevent\";i:1;s:14:\"compostallowed\";i:1;s:7:\"adddown\";i:1;s:7:\"addnews\";i:1;s:8:\"addalbum\";i:1;s:7:\"addpoll\";i:1;s:11:\"sideboxpoll\";i:1;s:7:\"profile\";i:1;s:6:\"search\";i:1;s:14:\"comviewallowed\";i:1;s:6:\"record\";i:1;s:8:\"features\";i:1;s:7:\"support\";i:1;s:7:\"welcome\";i:1;}', 3);";


$sql[] = "INSERT INTO `{$database['prefix']}authteam` (`id`, `teamname`, `ispatrol`, `getpoints`, `register`) VALUES (1, 'Admin', 0, 0, 0);";
$sql[] = "INSERT INTO `{$database['prefix']}authteam` (`id`, `teamname`, `ispatrol`, `getpoints`, `register`) VALUES (2, 'New User', 0, 0, 0);";


$sql[] = "INSERT INTO `{$database['prefix']}censorwords` (`id`, `word`) VALUES (2, 'shit');";
$sql[] = "INSERT INTO `{$database['prefix']}censorwords` (`id`, `word`) VALUES (11, '*fuck*');";

$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('version', '1.24');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('troopname', {$config['troopname']});";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('disablesite', '0');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('patrolpage', '1');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('defaulttheme', '1');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('cookiename', 'cmscout');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('disablereason', 'Updating things');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('photos_per_page', '6');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('session_length', '3600');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('troop_description', {$config['troopdesc']});";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('siteaddress', {$config['address']});";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('debug', 'false');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('photopath', 'photos');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('downloadpath', 'downloads');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('adcode', NULL);";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('sitemail', {$config['webemail']});";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('numnews', '5');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('confirmarticle', '1');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('confirmalbum', '1');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('confirmphoto', '1');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('confirmevent', '1');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('confirmdownload', '1');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('confirmnews', '1');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('confirmcomment', '1');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('avyx', '100');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('avyy', '100');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('sigsize', '255');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('activetime', '300');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('allowtroop', '1');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('register', '1');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('softdebug', '0');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('numlatest', '5');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('zone', {$config['timezone']});";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('postcount', '15');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('photox', '320');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('photoy', '240');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('avatarpath', 'avatars');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('photos_per_row', '2');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('allowtemplate', '1');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('registerimage', '1');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('gzip', '0');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('numpm', '10');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('confirmpoll', '1');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('defaultaccess', '1');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('accountactivation', '1');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('newssort', '0');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('articledisplay', '0');";
$sql[] = "INSERT INTO `{$database['prefix']}config` (`name`, `value`) VALUES ('albumdisplay', '0');";

$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (1, 'Logon Box', '{if \$islogged == false}\r\n<form id=\"logon\" method=\"post\" action=\"{\$result}\">\r\n			<p style=\"text-align:center\">Username <br /><input type=\"text\" name=\"username\" id=\"username\" size=\"20\" maxlength=\"50\" class=\"inputbox\" /><br />\r\n			Password <br /><input type=\"password\" name=\"password\" id=\"password\" size=\"20\" maxlength=\"50\" class=\"inputbox\" /><br />\r\n				<input type=\"submit\" name=\"Login\" id=\"Login\" value=\"Login\" class=\"button\" /><br />\r\n<a  class=\"navlink\" style=\"font-size:12px\" href=\"index.php?page=forgot\">I forgot my username and password!</a>{if \$config.register == 1}<br />\r\n<a  class=\"navlink\" style=\"font-size:12px\" href=\"index.php?page=register\">I''d like to register.</a></p>{/if}\r\n</form>\r\n{else}\r\n <span class=\"text\">You are logged in as {\$uname}<br /><a href=\"index.php?action=logout\" class=\"navlink\">Logout</a></span>\r\n{/if}', 1, 'logon');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (2, 'Photo Album', 'photos', 2, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (4, 'Main Page', 'frontpage', 2, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (5, 'Group Link Box', '', 1, 'patrolbox');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (28, 'Group Home Page', 'frontpage', 4, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (29, 'Group Points', 'points', 2, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (8, 'News Box', '{if \$numnewsbox> 0}\r\n<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\" summary=\"News Table\">\r\n		{section name=news loop=\$numnewsbox}	\r\n			<tr>\r\n			<td valign=\"top\" class=\"text\">\r\n				<div style=\"text-align:center\" class=\"smalltext\"><a href=\"index.php?page=news&amp;id={\$newsbox[news].id}\" class=\"navlink\">{\$newsbox[news].title}</a></div>\r\n			</td>\r\n			</tr>\r\n		{/section}\r\n<tr>\r\n<td><div  style=\"text-align:center\" class=\"smalltext\"><a href=\"index.php?page=news\" class=\"navlink\">News Archive</a></div></td>\r\n</tr>\r\n </table>\r\n{else}\r\n<span class=\"navitem\">No News Available</span>\r\n{/if}{if \$newsboxrss == 0 && \$uname != \"Guest\"}<a href=\"index.php?page=rss&amp;action=add&amp;type=6&amp;id=1\" class=\"navlink\"><img border=\"0\" src=\"{\$templateinfo.imagedir}rss_add.png\" alt=\"Add to RSS feed\" title=\"Add to RSS feed\" /></a>&nbsp;{elseif \$newsboxrss == 1 && \$uname != \"Guest\"}<a href=\"index.php?page=rss&amp;action=delete&amp;type=6&amp;id=1\" class=\"navlink\"><img border=\"0\" src=\"{\$templateinfo.imagedir}rss_delete.png\" alt=\"Remove from RSS feed\" title=\"Remove from RSS feed\" /></a>&nbsp;{/if}', 1, 'newsbox');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (9, 'Downloads', 'downloads', 2, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (10, 'Calender', 'calender', 2, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (11, 'Articles', 'patrolarticle', 2, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (12, 'Search Site', 'search', 2, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (14, 'My Things', 'mythings', 2, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (15, 'View Record', 'record', 2, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (16, 'Profile', 'profile', 2, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (17, 'View Comments Allowed', 'comviewallowed', 3, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (18, 'Post Comments Allowed', 'compostallowed', 3, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (19, 'My Group', 'mypatrol', 2, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (20, 'Post Photo Album Allowed', 'addphotoalbum', 3, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (21, 'Post Article Allowed', 'addarticle', 3, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (23, 'Post Calendar Event Allowed', 'addevent', 3, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (24, 'Post Download Allowed', 'adddown', 3, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (25, 'Post News Allowed', 'addnews', 3, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (26, 'Group Articles', 'patrolarticle', 4, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (27, 'Group Photos', 'photos', 4, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (30, 'Administration Panel Link', '{if (\$adminpanel == \"Y\") && (\$uname != \"Guest\")}<a href=\"admin/admin.php\" class=\"navlink\">Administration Panel</a>{/if}', 1, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (31, 'Forums', 'forums', 2, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (32, 'Personal Messenger', 'pmmain', 2, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (33, 'Online Users', '<div  class=\"text\">\r\n<strong>{\$userlist[0]}</strong> Registered {if \$userlist[0] != 1}Users{else}User{/if}<br /><strong>{\$userlist[1]}</strong> {if \$userlist[1] != 1}Guests{else}Guest{/if}\r\n{if \$userlist[0] > 0}<br /><br />\r\n<strong>Users Online:</strong><br />\r\n{section name=users loop=\$userlist[0]+2 start=2}\r\n<a href=\"index.php?page=profile&amp;action=view&amp;user={\$userlist[users].uname}\" title=\"View User Profile\" class=\"navlink\">{\$userlist[users].uname}</a>{if \$smarty.section.users.index == \$userlist[0]+1 || \$userlist[0] <= 1}{else}, {/if}\r\n {if \$smarty.section.users.iteration % 2 == 0}<br />{/if}\r\n{/section}{/if}\r\n</div>', 1, 'onlineusers');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (38, 'Post Poll Allowed', 'addpoll', 3, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (34, 'Award Scheme Viewer', 'advancements', 2, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (35, 'Latest Forum Posts', '{if \$numlatestposts> 0}\r\n<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\" summary=\"Forum Posts\">\r\n		{section name=latestposts loop=\$numlatestposts}	\r\n			<tr>\r\n			<td valign=\"top\" class=\"text\">\r\n				<div  style=\"text-align:center\" class=\"smalltext\"><a href=\"index.php?page=forums&amp;action=topic&amp;t={\$latestposts[latestposts].id}\" class=\"navlink\">{\$latestposts[latestposts].subject|truncate:50}</a></div>\r\n			</td>\r\n			</tr>\r\n		{/section}\r\n </table>\r\n{else}\r\nNo posts in the forum\r\n{/if}', 1, 'latestpost');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (36, 'Scouts Seach Box', '<!-- Start Of Scouts Search Code -->\r\n<div>\r\n<form method=\"get\" action=\"http://www.scoutsearch.org.uk\">\r\n<img src=\"{\$templateinfo.imagedir}scoutsearch.gif\" alt=\"Scouts Search\" /><br />\r\n<input type=\"text\" name=\"qry\" size=\"20\" class=\"inputbox\" /><br />\r\n<input type=\"submit\" value=\"Go\" class=\"button\" />\r\n<input type=\"hidden\" name=\"from\" value=\"{\$config.siteaddress}\" />\r\n<input type=\"hidden\" name=\"mod\" value=\"search\" />\r\n<input type=\"hidden\" name=\"loc\" value=\"World-Wide\" />\r\n</form>\r\n<a href=\"http://www.scoutsearch.org.uk\" class=\"navlink\"></a>\r\n</div>\r\n<!-- End of Scouting Search Code -->', 1, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (37, 'Links Database', 'linksdata', 2, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (39, 'Post Poll to sidebox', 'sideboxpoll', 3, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (40, 'Poll', '{if \$numpollitems > 0}\r\n<table width=\"100%\" cellspacing=\"1\" cellpadding=\"1\">\r\n<tr>\r\n <td><div class=\"text\"><strong>{\$sideboxpoll.question}</strong></div> {if \$sideboxvoted != true && \$sideboxshowresult != true && \$expired == false}<form name=\"form1\" action=\"{\$pollpage}\" method=\"POST\">{/if}</td>\r\n </tr>\r\n {if \$sideboxvoted != true && \$sideboxshowresult != true && \$expired == false}\r\n {section name=poll loop=\$numpollitems}\r\n <tr>\r\n  <td align=\"left\"><div class=\"text\"><input type=\"radio\" name=\"sidepoll\" value=\"{\$sideboxpollitem[poll].id}\" />{\$sideboxpollitem[poll].value}</div></td>\r\n </tr>\r\n {/section}\r\n {else}\r\n  {section name=poll loop=\$numpollitems}\r\n <tr>\r\n  <td align=\"left\"><div class=\"text\">{\$sideboxpollitem[poll].value}: <img src=\"bar.php?rating={math equation=\"(x / y) * 100\" x=\$sideboxpollitem[poll].results y=\$sideboxtotalvotes format=\"%.2f\"}&amp;width=60&amp;red={\$templateinfo.red}&amp;blue={\$templateinfo.blue}&amp;green={\$templateinfo.green}\" alt=\"{\$sideboxpollitem[poll].results}/{\$sideboxtotalvotes}\" /></div></td>\r\n </tr>\r\n {/section}\r\n {/if}\r\n {if \$sideboxvoted != true && !\$expired}\r\n <tr>\r\n <td align=\"center\"><div class=\"text\">{if \$sideboxvoted != true && \$sideboxshowresult != true}<input type=\"submit\" value=\"Vote\" class=\"button\" name=\"pollvote\" id=\"pollvote\" /><br /><input type=\"button\" value=\"View Results\" class=\"button\" id=\"view\" onclick=\"window.location=''{\$pollpage}&sideview=1''\" /></form>{elseif \$sideboxshowresult == true && \$sideboxvoted != true && \$expired == false}<input type=\"button\" value=\"Vote\" class=\"button\" id=\"vote\" onclick=\"window.location=''{\$pollpage}''\" />{/if}</div></td>\r\n </tr>\r\n {elseif \$sideboxvoted == true && \$usersname != \"Guest\" && \$expired == false}\r\n  <tr>\r\n <td align=\"center\"><div class=\"text\">Thank you for voting</div></td>\r\n </tr>\r\n {elseif \$usersname == \"Guest\" && \$expired == false}\r\n   <tr>\r\n <td align=\"center\"><div class=\"text\">You need to login to vote</div></td>\r\n </tr>\r\n {else}\r\n   <tr>\r\n <td align=\"center\"><div class=\"text\">This poll is closed</div></td>\r\n </tr>\r\n {/if}\r\n {if \$expired == false && \$sideboxpoll.date_stop != '''' && \$sideboxpoll.date_stop != 0}\r\n    <tr>\r\n <td align=\"center\"><div class=\"text\">Poll closes: {\$sideboxpoll.date_stop|date_format}</div></td>\r\n </tr>\r\n {/if}\r\n     <tr>\r\n <td align=\"center\"><div class=\"text\">Votes: {\$sideboxtotalvotes}</div></td>\r\n </tr>\r\n<tr>\r\n<td align=\"center\"><div class=\"text\"><a href=\"index.php?page=polls\" class=\"navlink\">View All Polls</a></div></td>\r\n</tr>\r\n </table>\r\n{else}\r\n<div class=\"text\">There are currently no active sidebox polls</div>\r\n<div class=\"text\"><a href=\"index.php?page=polls\" class=\"navlink\">View All Polls</a></div>\r\n{/if}', 1, 'poll');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (41, 'Top x Forum Posters', '<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\" summary=\"Forum Posts\">\r\n		{section name=topposters loop=\$numposters}	\r\n			<tr>\r\n			<td valign=\"top\" class=\"text\">\r\n				<div  style=\"text-align:center\" class=\"smalltext\"><a href=\"index.php?page=profile&amp;action=view&amp;user={\$topposter[topposters].uname}\" title=\"View User Profile\" class=\"navlink\">{\$topposter[topposters].uname}</a> ({\$topposter[topposters].numposts})</div>\r\n			</td>\r\n			</tr>\r\n		{/section}\r\n </table>', 1, 'topcont');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (42, '5 Newest Users', '<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\" summary=\"Forum Posts\">\r\n		{section name=newest loop=5}	\r\n			<tr>\r\n			<td valign=\"top\" class=\"text\">\r\n				<div  style=\"text-align:center\" class=\"smalltext\"><a href=\"index.php?page=profile&amp;action=view&amp;user={\$newest[newest].uname}\" title=\"View User Profile\" class=\"navlink\">{\$newest[newest].uname}</a></div>\r\n			</td>\r\n			</tr>\r\n		{/section}\r\n </table>', 1, 'newest');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (43, 'Next Event', '<div>\r\n{if \$nextevent.summary != \"\"}\r\n<strong>{if \$nextevent.detail == 1}<a href=\"index.php?page=calender&item={\$nextevent.id}\" class=\"navlink\">{\$nextevent.summary}</a>{else}{\$nextevent.summary}{/if}</strong>\r\n<br />{if \$nextevent.enddate != \$nextevent.startdate}{/if}<strong>{\$nextevent.startdate|pretty_date}</strong>{if \$nextevent.enddate != \$nextevent.startdate} to <strong>{\$nextevent.enddate|pretty_date}</strong>{/if}\r\n{else}\r\nNo upcoming events\r\n{/if}\r\n</div>', 1, 'nextevent');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (44, 'Birthdays', '{if \$numbdays > 0}\r\n<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\" summary=\"Forum Posts\">\r\n{section name=bdays loop=\$numbdays}	\r\n			<tr>\r\n			<td valign=\"top\" class=\"text\">\r\n				<div  style=\"text-align:center\" class=\"smalltext\"><a href=\"index.php?page=profile&amp;action=view&amp;user={\$birthdays[bdays].uname}\" title=\"View User Profile\" class=\"navlink\">{\$birthdays[bdays].uname}</a> ({\$birthdays[bdays].age})</div>\r\n			</td>\r\n			</tr>\r\n		{/section}\r\n </table>\r\n{else}\r\nNo birthdays today\r\n{/if}', 1, 'bdays');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (45, 'News', 'news', 2, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (46, 'Statistics Box', 'Articles: {\$sideboxstats.art}<br />\r\nPhotos: {\$sideboxstats.photos}<br />\r\nUsers: {\$sideboxstats.users}<br />\r\nPosts: {\$sideboxstats.posts}<br />\r\nTopics: {\$sideboxstats.topics}\r\n', 1, 'stats');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (47, 'Group Log', 'patrollog', 4, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (48, 'Website Polls', 'polls', 2, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (49, 'Statistics', 'statistics', 2, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (50, 'Patrol Attendance Register', 'attendance', 5, '');";
$sql[] = "INSERT INTO `{$database['prefix']}functions` (`id`, `name`, `code`, `type`, `filetouse`) VALUES (51, 'Sub Site Patrol Points', 'points', 6, '');";

$sql[] = "INSERT INTO `{$database['prefix']}help` (`page`, `title`, `help`, `id`) VALUES ('static_content', 'Static Pages', 'This is a non-interactive page. As such there is nothing that you as a user needs to know about this page, except that all you can do with it is read it.<br />', 1);";
$sql[] = "INSERT INTO `{$database['prefix']}help` (`page`, `title`, `help`, `id`) VALUES ('calender', 'The Calendar', 'The calendar is rather easy to use.At the top there are 5 buttons and two drop down boxes.The buttons do exactly as they say. They take you to the next/previous month or year. There is also a button labeled \"Goto Today\" which will take you to the calendar entry for today.The two drop down boxes can be used to select a month/year without needing to scroll through all the months/years between where you are on the calendar and where you want to be.Clicking on a item on the calendar that is a link will take you to a page that contains alot more information about that particular event.', 2);";
$sql[] = "INSERT INTO `{$database['prefix']}help` (`page`, `title`, `help`, `id`) VALUES ('patrolarticle', 'Articles', 'This page shows you a list of articles.Clicking on the articles title will take you to the article its self.On the article page you can read the article, look at the photos for the article (If there are any) and post a comment about the article (If your allowed to that is)', 3);";
$sql[] = "INSERT INTO `{$database['prefix']}help` (`page`, `title`, `help`, `id`) VALUES ('photos', 'Photo Albums', 'The drop down box is used to select what photo album you want to view.Just select the photo album and you will be taken to it. You can then use the links under the drop down box to browse through the album.', 4);";
$sql[] = "INSERT INTO `{$database['prefix']}help` (`page`, `title`, `help`, `id`) VALUES ('downloads', 'Downloads', 'The downloads page shows you all the different categories available.Clicking on a category will take you to it where you will be able to download the file that you want by clicking on \"download\"', 5);";
$sql[] = "INSERT INTO `{$database['prefix']}help` (`page`, `title`, `help`, `id`) VALUES ('search', 'Search', 'Simply type what you want to search for in the box and click \"Search\"This will return all items where your search term appear.', 6);";
$sql[] = "INSERT INTO `{$database['prefix']}help` (`page`, `title`, `help`, `id`) VALUES ('patrolpages', 'Group Home Pages', 'The group home pages are a bit hard to describe as they can be different for each and every group depending on what that group has made their site look like.But one thing that might be in every on of them is the Articles and Photos', 7);";
$sql[] = "INSERT INTO `{$database['prefix']}help` (`page`, `title`, `help`, `id`) VALUES ('profile', 'Your Profile', '<p>This page allows you to change your profile.You can change your password, your email address and any other personal information.You can also change your theme.A theme changes the look of the entire site.</p><p>&nbsp;<br />You might be viewing the &quot;Public profile&quot; screen, this allows you to see a users stats. </p>', 8);";
$sql[] = "INSERT INTO `{$database['prefix']}help` (`page`, `title`, `help`, `id`) VALUES ('mythings', 'My Things', 'This page allows you to (Depending on the permisions of your group) add articles, notices, photo albums, downloads, calendar events and news items.You can also edit/remove any items that you currently own. By clicking on the change ownership icon (<img border=\"0\" title=\"Ownership Icon\" alt=\"Ownership Icon\" src=\"/cmscout1.10/admin/images/owner.gif\" />) you can change who the owner of the item is.', 9);";
$sql[] = "INSERT INTO `{$database['prefix']}help` (`page`, `title`, `help`, `id`) VALUES ('addphotoalbum', 'Add Photo Album', 'This page allows you to add a photo album.Simply type in the name of the album and select where it will appear and click on \"Add Album\"You will then be taken to a page where you can add your photos to the album', 10);";
$sql[] = "INSERT INTO `{$database['prefix']}help` (`page`, `title`, `help`, `id`) VALUES ('addarticle', 'Add Article', 'This page allows you to add a article.Just fill in the fields and write your article.You can attach a existing album by selecting it from the drop down box. You can also attach a title picture using the picture field.', 11);";
$sql[] = "INSERT INTO `{$database['prefix']}help` (`page`, `title`, `help`, `id`) VALUES ('addevent', 'Add Event', 'This page allows you to add a event.Simply fill in the required fields and click on \"Add item\"', 13);";
$sql[] = "INSERT INTO `{$database['prefix']}help` (`page`, `title`, `help`, `id`) VALUES ('mypatrol', 'My Patrol', 'This page displays a list of all the people in your group. You view the users public profiles by clicking on their name. You can also send a personal message to everyone that is in your group.', 14);";
$sql[] = "INSERT INTO `{$database['prefix']}help` (`page`, `title`, `help`, `id`) VALUES ('record', 'Scout Record', 'This page simply shows what items of your advancement badges you still need to achieve.If something is incorrectly marked as incompleted please contact the webmaster.It also shows all the badges that you have achieved,', 15);";
$sql[] = "INSERT INTO `{$database['prefix']}help` (`page`, `title`, `help`, `id`) VALUES ('register', 'Registration', 'Simply fill in all the required fields and click on next. Once you are done the system will tell you.And it will email you your username and password to the email address that you specified.', 16);";
$sql[] = "INSERT INTO `{$database['prefix']}help` (`page`, `title`, `help`, `id`) VALUES ('forgot', 'Forgotten password or username', 'Simply type in the email address that you registered with.You will then recieve a email address with your username and a new randomly generated password. Please logon and change your password to something that you can easily remember, but that can not be easily broken or guessed by someone else.', 17);";
$sql[] = "INSERT INTO `{$database['prefix']}help` (`page`, `title`, `help`, `id`) VALUES ('advancements', 'Award Schemes', 'First choose what award scheme you want to look at. Then you can view the award scheme''s badges and their requirements.', 19);";
$sql[] = "INSERT INTO `{$database['prefix']}help` (`page`, `title`, `help`, `id`) VALUES ('linksdata', 'Links', 'Simply click on the link that you want to visit', 20);";
$sql[] = "INSERT INTO `{$database['prefix']}help` (`page`, `title`, `help`, `id`) VALUES ('subsite', 'Sub Site Help', 'Use the menu options on the side, top and bottom to navigate through the sub-site', 21);";
$sql[] = "INSERT INTO `{$database['prefix']}help` (`page`, `title`, `help`, `id`) VALUES ('pmmain', 'Personal Messenger', '<p>Use the buttons at the top to choose what you want to do. There are four different message boxes.</p><ul><li>Inbox - Holds all messages that you have recieved</li><li>Sentbox - Holds all messages that you have sent to other users</li><li>Savebox - You can choose to move a sent or recieved message into the savebox to reduce clutter in your inbox and sentbox</li><li>Drafts - Messages that haven''t been sent to any users yet, but that you''ve saved.</li><li>By choosing the &quot;Type PM&quot; button you can type a new message to a user. </li></ul>', 22);";
$sql[] = "INSERT INTO `{$database['prefix']}help` (`page`, `title`, `help`, `id`) VALUES ('forums', 'Forum Help', 'Pick the forum that you want to access and click on its link. You can then choose to read a topic, reply to a topic, post a new topic or to moderate the forum which allows you to delete topics.What you can do depends on what privalages the administrator has given your group.&nbsp;', 23);";
$sql[] = "INSERT INTO `{$database['prefix']}help` (`page`, `title`, `help`, `id`) VALUES ('bbcode', 'BBCode', '<strong>What is BBCode?</strong> <br />BBCode is a special implementation of HTML. Whether you can actually use BBCode in your posts on the forum is determined by the administrator. In addition, you can disable BBCode on a per post basis via the posting form. BBCode itself is similar in style to HTML: tags are enclosed in square braces [ and ] rather than &lt; and &gt; and it offers greater control over what and how something is displayed. Depending on the template you are using you may find adding BBCode to your posts is made much easier through a clickable interface above the message area on the posting form. Even with this you may find the following guide useful.  <strong>How to create bold, italic and underlined text</strong> <br />BBCode includes tags to allow you to quickly change the basic style of your text. This is achieved in the following ways: <ul><li>To make a piece of text bold enclose it in <strong>[b][/b]</strong>, eg. <br /><br /><strong>[b]</strong>Hello<strong>[/b]</strong><br /><br />will become <strong>Hello</strong></li><li>For underlining use <strong>[u][/u]</strong>, for example:<br /><br /><strong>[u]</strong>Good Morning<strong>[/u]</strong><br /><br />becomes <u>Good Morning</u></li><li>To italicise text use <strong>[i][/i]</strong>, eg.<br /><br />This is <strong>[i]</strong>Great!<strong>[/i]</strong><br /><br />would give This is <em>Great!</em></li></ul><em><br /></em><br />  <strong>How to change the text colour or size</strong><br />To alter the color or size of your text the following tags can be used. Keep in mind that how the output appears will depend on the viewers browser and system: <ul><li>Changing the colour of text is achieved by wrapping it in <strong>[color=][/color]</strong>. You can specify either a recognised colour name (eg. red, blue, yellow, etc.) or the hexadecimal triplet alternative, eg. #FFFFFF, #000000. For example, to create red text you could use:<br /><br /><strong>[color=red]</strong>Hello!<strong>[/color]</strong><br /><br />or<br /><br /><strong>[color=#FF0000]</strong>Hello!<strong>[/color]</strong><br /><br />will both output <span style=\"color: red\">Hello!</span></li><li>Changing the text size is achieved in a similar way using <strong>[size=][/size]</strong>. This tag is dependent on the template you are using but the recommended format is a numerical value representing the text size in pixels, starting at 1 (so tiny you will not see it) through to 29 (very large). For example:<br /><br /><strong>[size=9]</strong>SMALL<strong>[/size]</strong><br /><br />will generally be <span style=\"font-size: 9px\">SMALL</span><br /><br />whereas:<br /><br /><strong>[size=24]</strong>HUGE!<strong>[/size]</strong><br /><br />will be <span style=\"font-size: 24px\">HUGE!</span></li></ul><span style=\"font-size: 24px\"><br /></span><br />  <strong>Can I combine formatting tags?</strong><br />Yes, of course you can; for example to get someones attention you may write:<br /><br /><strong>[size=18][color=red][b]</strong>LOOK AT ME!<strong>[/b][/color][/size]</strong><br /><br />this would output <span style=\"color: red; font-size: 18px\"><strong>LOOK AT ME!</strong></span><br /><br />We don''t recommend you output lots of text that looks like this, though! Remember that it is up to you, the poster, to ensure that tags are closed correctly. For example, the following is incorrect:<br /><br /><strong>[b][u]</strong>This is wrong<strong>[/b][/u]</strong>  <strong>Quoting text in replies</strong><br />There are two ways you can quote text: with a reference or without.<ul><li>When you utilise the Quote function to reply to a post on the board you should notice that the post text is added to the message window enclosed in a <strong>[quote=&quot;&quot;][/quote]</strong> block. This method allows you to quote with a reference to a person or whatever else you choose to put. For example, to quote a piece of text Mr. Blobby wrote, you would enter:<br /><br /><strong>[quote=&quot;Mr. Blobby&quot;]</strong>The text Mr. Blobby wrote would go here<strong>[/quote]</strong><br /><br />The resulting output will automatically add: Mr. Blobby wrote: before the actual text. Remember that you <strong>must</strong> include the quotation marks &quot;&quot; around the name you are quoting -- they are not optional.</li><li>The second method allows you to blindly quote something. To utilise this enclose the text in <strong>[quote][/quote]</strong> tags. When you view the message it will simply show: Quote: before the text itself.</li></ul><br />  <strong>Outputting code or fixed width data</strong><br />If you want to output a piece of code or in fact anything that requires a fixed width with a Courier-type font, you should enclose the text in <strong>[code][/code]</strong> tags, eg.<br /><br /><strong>[code]</strong>echo &quot;This is some code&quot;;<strong>[/code]</strong><br /><br />All formatting used within <strong>[code][/code]</strong> tags is retained when you later view it.  <strong>Creating an Un-ordered list</strong><br />BBCode supports two types of lists, unordered and ordered. They are essentially the same as their HTML equivalents. An unordered list ouputs each item in your list sequentially one after the other indenting each with a bullet character. To create an unordered list you use <strong>[list][/list]</strong> and define each item within the list using <strong>[*]</strong>. For example, to list your favorite colours you could use:<br /><br /><strong>[list]</strong><br /><strong>[*]</strong>Red<br /><strong>[*]</strong>Blue<br /><strong>[*]</strong>Yellow<br /><strong>[/list]</strong><br /><br />This would generate the following list:<ul><li>Red</li><li>Blue</li><li>Yellow</li></ul><p>&nbsp;</p><p><strong>Creating an Ordered list</strong><br />The second type of list, an ordered list gives you control over what is output before each item. To create an ordered list you use <strong>[list=1][/list]</strong> to create a numbered list or alternatively <strong>[list=a][/list]</strong> for an alphabetical list. As with the unordered list items are specified using <strong>[*]</strong>. For example:<br /><br /><strong>[list=1]</strong><br /><strong>[*]</strong>Go to the shops<br /><strong>[*]</strong>Buy a new computer<br /><strong>[*]</strong>Swear at computer when it crashes<br /><strong>[/list]</strong><br /><br />will generate the following:</p><ol><li>Go to the shops</li><li>Buy a new computer</li><li>Swear at computer when it crashes</li></ol>Whereas for an alphabetical list you would use:<br /><br /><strong>[list=a]</strong><br /><strong>[*]</strong>The first possible answer<br /><strong>[*]</strong>The second possible answer<br /><strong>[*]</strong>The third possible answer<br /><strong>[/list]</strong><br /><br />giving<ol><li>The first possible answer</li><li>The second possible answer</li><li>The third possible answer</li></ol><p>&nbsp;</p><p><strong>Linking to another site</strong><br />BBCode supports a number of ways of creating URIs, Uniform Resource Indicators better known as URLs.</p><ul><li>The first of these uses the <strong>[url=][/url]</strong> tag; whatever you type after the = sign will cause the contents of that tag to act as a URL. For example, to link to cmscout.za.net you could use:<br /><br /><strong>[url=http://www.cmscout.za.net/]</strong>Visit CMScout!<strong>[/url]</strong><br /><br />This would generate the following link, <a target=\"_blank\" href=\"http://www.cmscout.za.net/\">Visit CMScout!</a> You will notice the link opens in a new window so the user can continue browsing the forums if they wish.</li><li>If you want the URL itself displayed as the link you can do this by simply using:<br /><br /><strong>[url]</strong>http://www.cmscout.za.net/<strong>[/url]</strong><br /><br />This would generate the following link: <a target=\"_blank\" href=\"http://www.cmscout.za.net/\">http://www.cmscout.za.net/</a></li></ul><p>As with all the BBCode tags you can wrap URLs around any of the other tags such as <strong>[img][/img]</strong> (see next entry), <strong>[b][/b]</strong>, etc. As with the formatting tags it is up to you to ensure the correct open and close order is following. For example:<br /><br /><strong>[url=http://www.cmscout.za.net/][img]</strong>http://www.cmscout.za.net/images/logo.gif<strong>[/url][/img]</strong><br /><br />is <u>not</u> correct which may lead to your post being deleted so take care.  </p><p>&nbsp;<br /><strong>Adding an image to a post</strong><br />BBCode incorporates a tag for including images in your posts. Two very important things to remember when using this tag are: many users do not appreciate lots of images being shown in posts and second, the image you display must already be available on the Internet (it cannot exist only on your computer, for example, unless you run a webserver!). To display an image, you must surround the URL pointing to the image with <strong>[img][/img]</strong> tags. For example:<br /><br /><strong>[img]</strong>http://www.cmscout.za.net/images/logo.gif<strong>[/img]</strong><br /><br />As noted in the URL section above you can wrap an image in a <strong>[url][/url]</strong> tag if you wish, eg.<br /><br /><strong>[url=http://cmscout.za.net/][img]</strong>http://www.cmscout.za.net/images/logo.gif<strong>[/img][/url]</strong><br /><br />would generate:<br /><br /><a target=\"_blank\" href=\"http://www.cmscout.za.net/\"><img border=\"0\" src=\"templates/CMScout/images/logo.gif\" /></a><br /></p>', 24);";



$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (1, 1, '{if \$number_of_albums > 0}\r\n    <table width=\"60%\" cellspacing=\"0\" cellpadding=\"2\" align=\"center\">\r\n        <tr style=\"height:155px\">\r\n        {section name=albums loop=\$number_of_albums}\r\n            {if \$patrolpages != 1}<td width=\"50%\"><div align=\"center\"><a href=\"index.php?page=photos&amp;album={\$albums[albums].ID}&amp;menuid={\$menuid}\" title=\"View {\$albums[albums].album_name}\">{\$albums[albums].album_name}<br /><img border=\"0\" src=\"thumbnail.php?pic={\$albums[albums].randomphoto}\" alt=\"View {\$albums[albums].album_name}\" /><br />\r\n            </a> <span class=\"smalltext\">Contains {\$albums[albums].numphotos} photos</span>\r\n            </div></td>\r\n            {else}<td width=\"50%\"><div align=\"center\"><a href=\"index.php?page=patrolpages&amp;patrol={\$patrolname}&amp;content=photos&amp;album={\$albums[albums].ID}&amp;menuid={\$menuid}\" title=\"View {\$albums[albums].album_name}\">{\$albums[albums].album_name}<br /><img border=\"0\" src=\"thumbnail.php?pic={\$albums[albums].randomphoto}\" alt=\"View {\$albums[albums].album_name}\" /><br />\r\n            </a> <span class=\"smalltext\">Contains {\$albums[albums].numphotos} photos</span>\r\n            </div></td>\r\n            {/if}\r\n        {if (\$smarty.section.albums.iteration % 3 == 0)}</tr><tr>{/if}\r\n        {/section}\r\n        {if \$number_of_albums % 3 != 0}<td width=\"50%\">&nbsp;</td>{/if}\r\n        </tr>\r\n    </table>\r\n{else}\r\n<div style=\"text-align:left\">There are no photo albums here yet.</div>\r\n {/if}', 1);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (1, 2, '    {if \$album_id != ''''}\r\n    {if \$numphotos > 0}         \r\n        <table style=\"width:{\$config.photox*\$config.photos_per_row}px\" cellspacing=\"1\" cellpadding=\"4\" class=\"table\" align=\"center\">\r\n            <tr>\r\n            <th colspan=\"{\$config.photos_per_row}\" class=\"bighead\">{\$view_album_name} (Page {\$currentpage} of {\$numpages})</th>\r\n            </tr>\r\n            <tr>\r\n            <th colspan=\"{\$config.photos_per_row}\" class=\"smallhead\">\r\n                <div style=\"text-align:center\">\r\n        Page: {if \$prev && \$patrolpages != 1}\r\n            <a href=\"index.php?page=photos&amp;subcat=troop&amp;start={\$prev_start}&amp;album={\$album_id}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}prev.png\" alt=\"Previous Page\" title=\"Previous Page\" /></a>\r\n        {elseif \$prev && \$patrolpages == 1}\r\n            <a href=\"index.php?page=patrolpages&amp;patrol={\$patrolname}&amp;content=photos&amp;start={\$prev_start}&amp;album={\$album_id}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}prev.png\" alt=\"Previous Page\" title=\"Previous Page\" /></a>\r\n        {/if}\r\n    {if \$numpages > 6}\r\n        {if \$currentpage == 1 || \$currentpage == \$numpages}\r\n            {section name=pages loop=3}\r\n                {if \$currentpage != \$smarty.section.pages.iteration && \$patrolpages != 1}\r\n                    <a href=\"index.php?page=photos&amp;start={\$num_per_page*\$smarty.section.pages.index}&amp;album={\$album_id}&amp;menuid={\$menuid}\">\r\n                {elseif \$patrolpages == 1 && \$currentpage != \$smarty.section.pages.iteration}\r\n                    <a href=\"index.php?page=patrolpages&amp;patrol={\$patrolname}&amp;content=photos&amp;start={\$num_per_page*\$smarty.section.pages.index}&amp;album={\$album_id}&amp;menuid={\$menuid}\">\r\n                {else}\r\n                    <span class=\"currpage\">\r\n                {/if}{\$smarty.section.pages.iteration}{if \$currentpage != \$smarty.section.pages.iteration}</a>{else}</span>{/if}\r\n            {/section}   \r\n....            \r\n            {section name=pages loop=\$numpages+1 start=\$numpages-2}\r\n                {if \$currentpage != \$smarty.section.pages.index && \$patrolpages != 1}\r\n                    <a href=\"index.php?page=photos&amp;start={\$num_per_page*\$smarty.section.pages.index-\$num_per_page}&amp;album={\$album_id}&amp;menuid={\$menuid}\">\r\n                {elseif \$patrolpages == 1 && \$currentpage != \$smarty.section.pages.index}\r\n                    <a href=\"index.php?page=patrolpages&amp;patrol={\$patrolname}&amp;content=photos&amp;start={\$num_per_page*\$smarty.section.pages.index-\$num_per_page}&amp;album={\$album_id}&amp;menuid={\$menuid}\">\r\n                {else}\r\n                    <span class=\"currpage\">\r\n                {/if}{\$smarty.section.pages.index}{if \$currentpage != \$smarty.section.pages.index}</a>{else}</span>{/if}\r\n            {/section}        \r\n        {else}\r\n            {if \$currentpage != \$smarty.section.pages.index && \$patrolpages != 1}\r\n                    <a href=\"index.php?page=photos&amp;start=0&amp;album={\$album_id}&amp;menuid={\$menuid}\">\r\n                {elseif \$patrolpages == 1 && \$currentpage != \$smarty.section.pages.index}\r\n                    <a href=\"index.php?page=patrolpages&amp;patrol={\$patrolname}&amp;content=photos&amp;start=0&amp;album={\$album_id}&amp;menuid={\$menuid}\">\r\n{/if}1<a/>{if \$currentpage != 2 && \$currentpage != 3 && \$currentpage != 4}....{/if}     \r\n            {section name=pages loop=\$currentpage+3 start=\$currentpage-2}\r\n                {if !(\$smarty.section.pages.index <= 1) && !(\$smarty.section.pages.index >= \$numpages)}\r\n                {if \$currentpage != \$smarty.section.pages.index && \$patrolpages != 1}\r\n                    <a href=\"index.php?page=photos&amp;start={\$num_per_page*\$smarty.section.pages.index-\$num_per_page}&amp;album={\$album_id}&amp;menuid={\$menuid}\">\r\n                {elseif \$patrolpages == 1 && \$currentpage != \$smarty.section.pages.index}\r\n                    <a href=\"index.php?page=patrolpages&amp;patrol={\$patrolname}&amp;content=photos&amp;start={\$num_per_page*\$smarty.section.pages.index}&amp;album={\$album_id}&amp;menuid={\$menuid}\">\r\n                {else}\r\n                    <span class=\"currpage\">\r\n                {/if}{\$smarty.section.pages.index}{if \$currentpage != \$smarty.section.pages.index}</a>{else}</span>{/if}{/if}\r\n            {/section}\r\n            \r\n            {if \$currentpage != \$numpages-1 && \$currentpage != \$numpages-2 && \$currentpage != \$numpages-3}....{/if}<a href=\"index.php?page=forums&amp;action=topic&amp;start={\$num_per_page*\$numpages-\$num_per_page}&amp;t={\$topic.id}&amp;menuid={\$menuid}\">{\$numpages}<a/>\r\n        {/if}\r\n    {else}\r\n    {section name=pages loop=\$numpages}\r\n        {if \$currentpage != \$smarty.section.pages.iteration && \$patrolpages != 1}\r\n            <a href=\"index.php?page=photos&amp;start={\$num_per_page*\$smarty.section.pages.index}&amp;album={\$album_id}&amp;menuid={\$menuid}\">\r\n        {elseif \$patrolpages == 1 && \$currentpage != \$smarty.section.pages.iteration}\r\n            <a href=\"index.php?page=patrolpages&amp;patrol={\$patrolname}&amp;content=photos&amp;start={\$num_per_page*\$smarty.section.pages.index}&amp;album={\$album_id}&amp;menuid={\$menuid}\">\r\n        {else}\r\n            <span class=\"currpage\">\r\n        {/if}{\$smarty.section.pages.iteration}{if \$currentpage != \$smarty.section.pages.iteration}</a>{else}</span>{/if}\r\n    {/section}\r\n    {/if}\r\n    {if \$next && \$patrolpages != 1}\r\n        <a href=\"index.php?page=photos&amp;subcat=troop&amp;start={\$next_start}&amp;album={\$album_id}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}next.png\" alt=\"Next Page\" title=\"Next Page\" /></a>\r\n    {elseif \$next && \$patrolpages == 1}\r\n        <a href=\"index.php?page=patrolpages&amp;patrol={\$patrolname}&amp;content=photos&amp;start={\$next_start}&album={\$album_id}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}next.png\" alt=\"Next Page\" title=\"Next Page\" /></a>\r\n    {/if}\r\n    </div>\r\n            </th>\r\n            </tr>\r\n            {if \$numarticles > 0}\r\n            <tr>\r\n            <th colspan=\"{\$config.photos_per_row}\" class=\"smallhead\">\r\n            Linked articles: {section name=loop loop=\$numarticles}<a {if \$patrolpages != 1}href=\"index.php?page=patrolarticle&id={\$articlelist[loop].ID}&menuid={\$menuid}\"{else}href=\"index.php?page=patrolpages&amp;patrol={\$patrolname}&amp;content=patrolarticle&id={\$articlelist[loop].ID}&amp;menuid={\$menuid}\"{/if}>{\$articlelist[loop].title}</a>{if \$smarty.section.loop.iteration < \$numarticles}&nbsp;|&nbsp;{/if}{/section}\r\n            </th>\r\n            </tr>\r\n            {/if}\r\n            <tr style=\"height:{\$config.photoy}px\">\r\n            {section name=photos loop=\$limit}\r\n                {if \$photo[photos].filename != \"\"}<td class=\"row\" style=\"width:{\$config.photox}px\"><div align=\"center\"><img src=\"getphoto.php?pic={\$photo[photos].ID}&amp;maxsizex={\$config.photox}&amp;maxsizey={\$config.photoy}\" /><br />\r\n                <strong>Date Posted: {\$photo[photos].date+\$timeoffset|date_format_pretty}</strong><br />\r\n                {\$photo[photos].caption}\r\n                </div></td>{/if}\r\n            {if (\$smarty.section.photos.iteration % \$config.photos_per_row == 0) && (\$smarty.section.photos.iteration != \$limit)}</tr><tr style=\"height:{\$config.photoy}px\">{/if}\r\n        {/section}\r\n        </tr>\r\n        <tr>\r\n        <th colspan=\"{\$config.photos_per_row}\" class=\"smallhead\">\r\n            <div style=\"text-align:center\">\r\n        Page: {if \$prev && \$patrolpages != 1}\r\n            <a href=\"index.php?page=photos&amp;subcat=troop&amp;start={\$prev_start}&amp;album={\$album_id}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}prev.png\" alt=\"Previous Page\" title=\"Previous Page\" /></a>\r\n        {elseif \$prev && \$patrolpages == 1}\r\n            <a href=\"index.php?page=patrolpages&amp;patrol={\$patrolname}&amp;content=photos&amp;start={\$prev_start}&amp;album={\$album_id}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}prev.png\" alt=\"Previous Page\" title=\"Previous Page\" /></a>\r\n        {/if}\r\n    {if \$numpages > 6}\r\n        {if \$currentpage == 1 || \$currentpage == \$numpages}\r\n            {section name=pages loop=3}\r\n                {if \$currentpage != \$smarty.section.pages.iteration && \$patrolpages != 1}\r\n                    <a href=\"index.php?page=photos&amp;start={\$num_per_page*\$smarty.section.pages.index}&amp;album={\$album_id}&amp;menuid={\$menuid}\">\r\n                {elseif \$patrolpages == 1 && \$currentpage != \$smarty.section.pages.iteration}\r\n                    <a href=\"index.php?page=patrolpages&amp;patrol={\$patrolname}&amp;content=photos&amp;start={\$num_per_page*\$smarty.section.pages.index}&amp;album={\$album_id}&amp;menuid={\$menuid}\">\r\n                {else}\r\n                    <span class=\"currpage\">\r\n                {/if}{\$smarty.section.pages.iteration}{if \$currentpage != \$smarty.section.pages.iteration}</a>{else}</span>{/if}\r\n            {/section}   \r\n....            \r\n            {section name=pages loop=\$numpages+1 start=\$numpages-2}\r\n                {if \$currentpage != \$smarty.section.pages.index && \$patrolpages != 1}\r\n                    <a href=\"index.php?page=photos&amp;start={\$num_per_page*\$smarty.section.pages.index-\$num_per_page}&amp;album={\$album_id}&amp;menuid={\$menuid}\">\r\n                {elseif \$patrolpages == 1 && \$currentpage != \$smarty.section.pages.index}\r\n                    <a href=\"index.php?page=patrolpages&amp;patrol={\$patrolname}&amp;content=photos&amp;start={\$num_per_page*\$smarty.section.pages.index-\$num_per_page}&amp;album={\$album_id}&amp;menuid={\$menuid}\">\r\n                {else}\r\n                    <span class=\"currpage\">\r\n                {/if}{\$smarty.section.pages.index}{if \$currentpage != \$smarty.section.pages.index}</a>{else}</span>{/if}\r\n            {/section}        \r\n        {else}\r\n            {if \$currentpage != \$smarty.section.pages.index && \$patrolpages != 1}\r\n                    <a href=\"index.php?page=photos&amp;start=0&amp;album={\$album_id}&amp;menuid={\$menuid}\">\r\n                {elseif \$patrolpages == 1 && \$currentpage != \$smarty.section.pages.index}\r\n                    <a href=\"index.php?page=patrolpages&amp;patrol={\$patrolname}&amp;content=photos&amp;start=0&amp;album={\$album_id}&amp;menuid={\$menuid}\">\r\n{/if}1<a/>{if \$currentpage != 2 && \$currentpage != 3 && \$currentpage != 4}....{/if}     \r\n            {section name=pages loop=\$currentpage+3 start=\$currentpage-2}\r\n                {if !(\$smarty.section.pages.index <= 1) && !(\$smarty.section.pages.index >= \$numpages)}\r\n                {if \$currentpage != \$smarty.section.pages.index && \$patrolpages != 1}\r\n                    <a href=\"index.php?page=photos&amp;start={\$num_per_page*\$smarty.section.pages.index-\$num_per_page}&amp;album={\$album_id}&amp;menuid={\$menuid}\">\r\n                {elseif \$patrolpages == 1 && \$currentpage != \$smarty.section.pages.index}\r\n                    <a href=\"index.php?page=patrolpages&amp;patrol={\$patrolname}&amp;content=photos&amp;start={\$num_per_page*\$smarty.section.pages.index}&amp;album={\$album_id}&amp;menuid={\$menuid}\">\r\n                {else}\r\n                    <span class=\"currpage\">\r\n                {/if}{\$smarty.section.pages.index}{if \$currentpage != \$smarty.section.pages.index}</a>{else}</span>{/if}{/if}\r\n            {/section}\r\n            \r\n            {if \$currentpage != \$numpages-1 && \$currentpage != \$numpages-2 && \$currentpage != \$numpages-3}....{/if}<a href=\"index.php?page=forums&amp;action=topic&amp;start={\$num_per_page*\$numpages-\$num_per_page}&amp;t={\$topic.id}&amp;menuid={\$menuid}\">{\$numpages}<a/>\r\n        {/if}\r\n    {else}\r\n    {section name=pages loop=\$numpages}\r\n        {if \$currentpage != \$smarty.section.pages.iteration && \$patrolpages != 1}\r\n            <a href=\"index.php?page=photos&amp;start={\$num_per_page*\$smarty.section.pages.index}&amp;album={\$album_id}&amp;menuid={\$menuid}\">\r\n        {elseif \$patrolpages == 1 && \$currentpage != \$smarty.section.pages.iteration}\r\n            <a href=\"index.php?page=patrolpages&amp;patrol={\$patrolname}&amp;content=photos&amp;start={\$num_per_page*\$smarty.section.pages.index}&amp;album={\$album_id}&amp;menuid={\$menuid}\">\r\n        {else}\r\n            <span class=\"currpage\">\r\n        {/if}{\$smarty.section.pages.iteration}{if \$currentpage != \$smarty.section.pages.iteration}</a>{else}</span>{/if}\r\n    {/section}\r\n    {/if}\r\n    {if \$next && \$patrolpages != 1}\r\n        <a href=\"index.php?page=photos&amp;subcat=troop&amp;start={\$next_start}&amp;album={\$album_id}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}next.png\" alt=\"Next Page\" title=\"Next Page\" /></a>\r\n    {elseif \$next && \$patrolpages == 1}\r\n        <a href=\"index.php?page=patrolpages&amp;patrol={\$patrolname}&amp;content=photos&amp;start={\$next_start}&album={\$album_id}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}next.png\" alt=\"Next Page\" title=\"Next Page\" /></a>\r\n    {/if}\r\n    </div>\r\n        </th>\r\n        </tr>       \r\n        </table>\r\n        {/if}\r\n    {/if}', 53);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (3, 1, '{if \$showart == ''no''}\r\n{if \$patrol != '''' && \$patrol != ''general''}\r\n{if \$rss == 0 && \$uname != \"Guest\"}<a href=\"index.php?page=rss&amp;action=add&amp;id={\$patrol}&amp;type=5&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}rss_add.png\" alt=\"Add to RSS feed\" title=\"Add to RSS feed\" /></a>&nbsp;{elseif \$rss == 1 && \$uname != \"Guest\"}<a href=\"index.php?page=rss&amp;action=delete&amp;type=5&amp;id={\$patrol}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}rss_delete.png\" alt=\"Remove from RSS feed\" title=\"Remove from RSS feed\" /></a>&nbsp;{/if}\r\n<h1>Articles written by {\$patrol}</h1>\r\n{else}\r\n{if \$rss == 0 && \$uname != \"Guest\"}<a href=\"index.php?page=rss&amp;action=add&amp;type=4&amp;id=1&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}rss_add.png\" alt=\"Add to RSS feed\" title=\"Add to RSS feed\" /></a>&nbsp;{elseif \$rss == 1 && \$uname != \"Guest\"}<a href=\"index.php?page=rss&amp;action=delete&amp;type=4&amp;id=1&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}rss_delete.png\" alt=\"Remove from RSS feed\" title=\"Remove from RSS feed\" /></a>&nbsp;{/if}\r\n<h1>General articles</h1>\r\n{/if}\r\n{if (\$numarts)} \r\n{if \$patrol != '''' && \$patrol != ''general''}\r\n	<h2>This patrol has {\$numarts} {\$art}</h2>\r\n{else}\r\n	<h2>The troop has {\$numarts} general {\$art}</h2>\r\n{/if}\r\n		<table border=\"0\" cellspacing=\"1\" cellpadding=\"3\" class=\"table\" width = \"100%\">\r\n		  <tr>\r\n			<th>Title of article</th>\r\n			<th>Date posted</th>\r\n			<th>Author of article</th>\r\n		  </tr>\r\n		{section name=patrolarticles loop=\$numarts}\r\n			 <tr>\r\n				<td class=\"row\">{if \$patrol != '''' && \$patrol != ''general''}<a href=\"index.php?page=patrolpages&amp;patrol={\$patrolname}&amp;content=patrolarticle&amp;id={\$patrolarts[patrolarticles].ID}&amp;menuid={\$menuid}\">{\$patrolarts[patrolarticles].title}</a>{else}<a href=\"index.php?page=patrolarticle&amp;id={\$patrolarts[patrolarticles].ID}&amp;menuid={\$menuid}\">{\$patrolarts[patrolarticles].title}</a>{/if}</td>\r\n				<td class=\"row\">{\$patrolarts[patrolarticles].date_post+\$timeoffset|date_format_pretty}&nbsp;</td>\r\n				<td class=\"row\">{\$patrolarts[patrolarticles].author}&nbsp;</td>\r\n		   </tr>\r\n		 {/section}\r\n		</table>\r\n        {else}\r\n            No articles have been posted yet\r\n	 {/if}\r\n{else}	\r\n<a name=\"top\"></a>\r\n	<table width=\"100%\" border=\"0\" align=\"center\"  class=\"content\"> \r\n	  <tr>\r\n		<th colspan=\"3\">{\$article.title}</th>\r\n	  </tr> \r\n	  <tr>\r\n		<td width=\"20%\" align=\"center\"><div align=\"center\"><strong>Date Posted</strong><br />{\$article.date_post+\$timeoffset|date_format_pretty}<br />\r\n		 {if (\$article.date_happen)}<strong>Date of event</strong><br />{\$article.date_happen|date_format}</div></td>{/if}\r\n		<td align=\"center\">{if \$article.pic != \"\"}<div style=\"text-align:center\"><img src=\"getphoto.php?pic={\$article.ID}&amp;where=article&amp;maxsizex={\$config.photox}&amp;maxsizey={\$config.photoy}\" /></div>{else}&nbsp;{/if}</td>\r\n		<td width =\"20%\" align=\"center\"><strong>Author</strong><br />{\$article.author}<br />\r\n	</td>\r\n    <tr>\r\n        <td colspan=\"3\" align=\"center\">{if \$article.album_id && \$number_of_photos > 0}<a href=\"#photos\">Photos</a>&nbsp;&nbsp;&nbsp;{/if}{if (\$comviewallowed && \$numcom > 0) || \$compostallowed}<a href=\"#comments\">View/Post Comments</a>{/if}</td>\r\n    </tr>\r\n	  <tr><td height=\"25\"></td></tr>\r\n	  <tr>\r\n		<td class=\"bignewgray\" colspan=\"3\">\r\n		 {\$article.detail}\r\n		 <br /><br />\r\n	</td>\r\n	  </tr>\r\n		{if \$article.album_id && \$number_of_photos > 0} \r\n		 <tr>\r\n	 <th colspan=\"3\">\r\n	 <a name=\"photos\"></a>Photo''s for article\r\n	  </th></tr>\r\n<tr>\r\n    <td align=\"center\" colspan=\"3\">				\r\n		<input value=\"&lt;&lt;Back\" name=\"B2\" onclick=\"backward()\" type=\"button\" class=\"button\"  /> <input value=\"Next&gt;&gt;\" name=\"B1\" onclick=\"forward()\" type=\"button\" class=\"button\" /> <br />			  <input value=\"Start Over\" name=\"B2\" onclick=\"which=1;backward();return false\" type=\"button\" class=\"button\" /><br />\r\n\r\n    </td>\r\n</tr>\r\n<tr style=\"height:{\$config.photoy+5}px\" valign=\"middle\">\r\n<td align=\"center\" colspan=\"3\">\r\n<img src=\"getphoto.php?pic={\$photo[0].ID}&amp;maxsizex={\$config.photox}&amp;maxsizey={\$config.photoy}\" name=\"photoslider\" alt=\"{\$photo[0].caption}\" title=\"{\$photo[0].caption}\" />\r\n    </td>\r\n</tr>\r\n<tr>\r\n<td align=\"center\" colspan=\"3\">\r\n        <div id=\"lay\" align=\"center\"><strong>Date Posted: {\$photo[0].date+\$timeoffset|date_format_pretty}</strong><br />{if \$photo[0].caption != \"\"}{\$photo[0].caption}{else}No Caption{/if}</div>\r\n				<!--Show album-->\r\n			  <div style=\"text-align:center\">		  \r\n<script type=\"text/javascript\">\r\nvar photos=new Array()\r\nvar captions=new Array()\r\nvar dates=new Array()\r\nvar which=0\r\nvar whatphoto=1\r\nvar num = {\$number_of_photos}\r\n/*Change the below variables to reference your own images. You may have as many images in \r\nthe slider as you wish*/\r\n{section name=pics loop=\$number_of_photos}\r\nphotos[{\$smarty.section.pics.index}]=\"getphoto.php?pic={\$photo[pics].ID}&maxsizex={\$config.photox}&maxsizey={\$config.photoy}\"\r\ncaptions[{\$smarty.section.pics.index}]=\"{if \$photo[pics].caption != \"\"}{\$photo[pics].caption}{else}No Caption{/if}\"\r\ndates[{\$smarty.section.pics.index}] = \"{\$photo[pics].date+\$timeoffset|date_format_pretty}\"\r\n{/section}\r\npreload(photos)\r\n\r\n{literal}\r\nfunction numphoto() \r\n{\r\n    whatphoto = which + 1\r\n    window.status=''Picture '' + whatphoto + '' of ''  + num\r\n}\r\n\r\nfunction backward()\r\n{\r\n    if (which>0)\r\n    {\r\n        window.status=''''\r\n        which--\r\n        numphoto()\r\n        document.images.photoslider.src=photos[which]\r\n        document.images.photoslider.alt=captions[which]\r\n        document.images.photoslider.title=captions[which]\r\n        document.getElementById(\"lay\").innerHTML = \"<strong>Date Posted: \" + dates[which] + \"</strong><br />\" +captions[which];\r\n    }\r\n}\r\nfunction forward()\r\n{\r\n    if (which<photos.length-1)\r\n    {\r\n        which++\r\n        numphoto()\r\n        document.images.photoslider.src=photos[which]\r\n        document.images.photoslider.alt=captions[which]\r\n        document.images.photoslider.title=captions[which]\r\n        document.getElementById(\"lay\").innerHTML = \"<strong>Date Posted: \" + dates[which] + \"</strong><br />\" +captions[which];\r\n    }\r\n    else \r\n    {\r\n        window.status=''End of photos'';\r\n    }\r\n}\r\n{/literal}\r\n</script> \r\n              <a href=\"#top\"><small>Back to Top</small></a>\r\n			 </div>\r\n		</td></tr> {/if}\r\n        {if (\$comviewallowed && \$numcom > 0) || \$compostallowed}\r\n        <tr>\r\n            <th colspan=\"3\"><a name=\"comments\"></a>Comments</th>\r\n        </tr>\r\n            {if \$comviewallowed}\r\n                {section name=comments loop=\$numcom}\r\n                <tr>\r\n                    <td colspan=\"3\" align = \"left\">\r\n                     <div class=\"commentname\"><span style=\"font-weight:bold;\">Name:</span> {\$com[comments].uname}</div>\r\n                     <div class=\"commentdate\"><span style=\"font-weight:bold;\">Date posted:</span> {\$com[comments].date+\$timeoffset|date_format_pretty}</div>\r\n                     <div class=\"commentself\"><span style=\"font-weight:bold;\">Comment:</span> {\$com[comments].comment|bbcode2html}</div>\r\n                    </td>\r\n                </tr>\r\n                <tr><td>&nbsp;</td></tr>\r\n                {/section}\r\n            {/if}\r\n            {if \$compostallowed}\r\n                <tr>\r\n                    <td colspan=\"3\" align=\"center\">\r\n                    <form name=\"form1\" action=\"{\$editFormAction}\" method=\"post\">\r\n                     Post your comment: <br />\r\n                     <textarea name=\"comment\" cols=\"50\" rows=\"5\" class=\"inputbox\"></textarea><br /> \r\n                     <input type=\"submit\" name=\"submit\" id=\"submit\" value=\"Post Comment\" class=\"button\" />&nbsp;<input type=\"reset\" value=\"Cancel Comment\" id=\"reset\" class=\"button\" />\r\n                    </form>\r\n                    </td>\r\n                </tr>\r\n            {/if}\r\n            <tr>\r\n            <td colspan=\"3\" align=\"center\"><a href=\"#top\"><small>Back to Top</small></a></td>\r\n            </tr>\r\n        {/if}\r\n	</table>\r\n{/if}', 3);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (5, 1, '<a name=\"top\"></a><h1>{if \$otheruser != true}Your scouting record{else}Scouting record for {\$name}{/if}</h1>\r\n<div align=\"left\">\r\n{section name=num loop=\$numadva}\r\n - <a href=\"#{\$advan[num].advancement|replace:'' '':''''}\">{\$advan[num].advancement}</a><br />\r\n{/section}\r\n{if \$numbadge > 0} - <a href=\"#badges\">Badges</a><br />{/if}</div>\r\n{if \$numadva > 0}\r\n<table width=\"100%\"  border=\"0\" cellspacing=\"1\" cellpadding=\"4\" class=\"table\">\r\n	{section name=num loop=\$numadva}\r\n	  {if \$advan[num].numitems > 0}\r\n      <tr><th colspan=\"2\" class=\"bighead\"><a name=\"{\$advan[num].advancement|replace:'' '':''''}\"></a>{\$advan[num].advancement}</th></tr>\r\n	  <tr>\r\n        <th></th>\r\n		<th width=\"83%\" scope=\"col\"  class=\"smallhead\">Requirement</th>\r\n	  </tr>\r\n	  {section name=numreq loop=\$advan[num].numitems}\r\n		  <tr valign=\"top\" align=\"center\">\r\n            {if \$advan[num].items[numreq].done}<td class=\"complete\">Completed</td>{else}<td class=\"notcomplete\">Not Complete</td>{/if}\r\n			<td class=\"row\" title=\"{\$advan[num].items[numreq].description}\"><strong>{\$advan[num].items[numreq].item}</strong>{if \$advan[num].items[numreq].comment != ''''}<br />\r\n            <span class=\"comment\">{\$advan[num].items[numreq].comment}</span>{/if}</td>\r\n		  </tr>\r\n	  {/section}\r\n      <tr>\r\n      <td colspan=\"2\" class=\"row\">\r\n        <a href=\"#top\">Back to top</a>\r\n      </td>\r\n      </tr>\r\n      {/if}\r\n	 {/section}\r\n</table>\r\n{else}\r\nNo Advancements\r\n{/if}\r\n{if \$numbadge > 0}\r\n<p>&nbsp;</p>\r\n<table width=\"100%\"  border=\"0\" cellspacing=\"1\" cellpadding=\"4\" class=\"table\">\r\n  <tr>\r\n    <th scope=\"col\" colspan=\"2\" class=\"bighead\"><a name=\"badges\"></a>Badges Earned</th>\r\n  </tr>\r\n  <tr>\r\n    <th width=\"21%\" class=\"smallhead\">Date</th>\r\n    <th width=\"79%\" class=\"smallhead\">Badge</th>\r\n  </tr>\r\n{section name=badgenum loop=\$numbadge}\r\n  <tr>\r\n    <td class=\"row\">{\$badges[badgenum].date}</td>\r\n    <td class=\"row\">{\$badges[badgenum].badge}</td>\r\n  </tr>\r\n {/section}\r\n      <tr>\r\n      <td colspan=\"2\" class=\"row\">\r\n        <a href=\"#top\">Back to top</a>\r\n      </td>\r\n      </tr>\r\n</table>\r\n{else}\r\n<div align=\"center\">{if \$otheruser != true}You have not recieved any badges yet{else}{\$name} has not recieved any badges yet{/if}</div>\r\n{/if}', 4);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (4, 1, '<h1>Your Profile</h1>\r\n{if \$errors != \"\"}\r\n{\$errors}\r\n{/if}\r\n				 <form method=\"post\" name=\"scoutadd\" action=\"{\$editFormAction}\" enctype=\"multipart/form-data\">\r\n				   <table width=\"100%\" align=\"center\" border=\"0\" cellpadding=\"4\" cellspacing=\"1\" class=\"table\">\r\n					 <tr><th colspan=\"2\" align=\"center\" class=\"bighead\">Website Information</th></tr>\r\n					 <tr valign=\"baseline\">\r\n					  <td width=\"50%\" align=\"right\"  class=\"row\">User Name:</td>\r\n					  <td align=\"left\" class=\"row\">{\$uinfo.uname}</td>\r\n				     </tr>\r\n					  <tr valign=\"baseline\">\r\n					   <td align=\"right\"  class=\"row\">New Password:</td>\r\n					   <td align=\"left\" class=\"row\"><input name=\"password\" type=\"password\" size=\"25\" maxlength=\"50\" class=\"inputbox\" /></td>\r\n					  </tr>		\r\n					  <tr valign=\"baseline\">\r\n					   <td align=\"right\"  class=\"row\">Retype New Password:</td>\r\n					   <td align=\"left\" class=\"row\"><input name=\"repassword\" type=\"password\" size=\"25\" maxlength=\"50\" class=\"inputbox\" /></td>\r\n					  </tr>\r\n                      {if \$config.allowtemplate == 1 && \$numthemes > 1}\r\n					  <tr valign=\"baseline\">\r\n					    <td align=\"right\"  class=\"row\">Template:</td>\r\n					    <td align=\"left\" class=\"row\"><select name=\"theme\" id=\"theme\" class=\"inputbox\">\r\n						{section name=themes loop=\$numthemes}\r\n							<option value=\"{\$theme[themes].id}\" {if (\$uinfo.theme_id == \$theme[themes].id)}selected{/if}>{\$theme[themes].name}</option>\r\n						{/section}\r\n				        </select></td>\r\n				     </tr>			\r\n{/if}                     \r\n                    <tr>\r\n                      <td align=\"right\" class=\"row\"><div align=\"right\">Timezone </div></td>\r\n                      <td align=\"left\" class=\"row\"><div align=\"left\">\r\n                        <select name=\"zone\" id=\"zone\" class=\"inputbox\">\r\n                            {section name=zones loop=\$numzones}\r\n                                <option value=\"{\$zone[zones].id}\" {if (\$uinfo.timezone == \$zone[zones].id)}selected{/if}>{\$zone[zones].offset} Hours</option>\r\n                            {/section}\r\n                        </select>\r\n                      </div></td>\r\n                    </tr>\r\n                    <tr valign=\"baseline\">\r\n					   <td  align=\"right\" class=\"row\">Do you want to be emailed when a user posts a new item (Article, Photo Album, etc.)? </td>\r\n					   <td align=\"left\" class=\"row\"><input type=\"radio\" name=\"newcontent\" value=\"1\" {if \$personal.newcontent != 0}checked=\"checked\"{/if} />Yes&nbsp;<input type=\"radio\" name=\"newcontent\" value=\"0\" {if \$personal.newcontent != 1}checked=\"checked\"{/if} />No</td>\r\n					 </tr> \r\n                    <tr valign=\"baseline\">\r\n					   <td align=\"right\" class=\"row\">Is the {\$config.troopname} website allowed to send you emails?</td>\r\n					   <td align=\"left\" class=\"row\"><input type=\"radio\" name=\"allowemail\" value=\"1\" {if \$personal.allowemail != 0}checked=\"checked\"{/if} />Yes&nbsp;<input type=\"radio\" name=\"allowemail\" value=\"0\" {if \$personal.allowemail != 1}checked=\"checked\"{/if} />No</td>\r\n					 </tr>   \r\n					 <tr><th colspan=\"2\" align=\"center\" class=\"bighead\">Public Profile</th></tr>\r\n                    <tr valign=\"baseline\">\r\n					   <td align=\"right\" class=\"row\">Activate Public Profile?</td>\r\n					   <td align=\"left\" class=\"row\"><input type=\"radio\" name=\"publicprofile\" value=\"1\" {if \$personal.publicprofile != 0}checked=\"checked\"{/if} />Yes&nbsp;<input type=\"radio\" name=\"publicprofile\" value=\"0\" {if \$personal.publicprofile != 1}checked=\"checked\"{/if} />No</td>\r\n					 </tr>    \r\n                    <tr valign=\"baseline\">\r\n					   <td align=\"right\" class=\"row\">Show email address in profile?</td>\r\n					   <td align=\"left\" class=\"row\"><input type=\"radio\" name=\"showemail\" value=\"1\" {if \$personal.showemail != 0}checked=\"checked\"{/if} />Yes&nbsp;<input type=\"radio\" name=\"showemail\" value=\"0\" {if \$personal.showemail != 1}checked=\"checked\"{/if} />No</td>\r\n					 </tr>    \r\n                    <tr valign=\"baseline\">\r\n					   <td align=\"right\" class=\"row\">Show real name in profile?</td>\r\n					   <td align=\"left\" class=\"row\"><input type=\"radio\" name=\"showname\" value=\"1\" {if \$personal.showname != 0}checked=\"checked\"{/if} />Yes&nbsp;<input type=\"radio\" name=\"showname\" value=\"0\" {if \$personal.showname != 1}checked=\"checked\"{/if} />No</td>\r\n					 </tr>      \r\n                    <tr valign=\"baseline\">\r\n					   <td align=\"right\" class=\"row\">Show date of birth in profile?</td>\r\n					   <td align=\"left\" class=\"row\"><input type=\"radio\" name=\"showdob\" value=\"1\" {if \$personal.showdob != 0}checked=\"checked\"{/if} />Yes&nbsp;<input type=\"radio\" name=\"showdob\" value=\"0\" {if \$personal.showdob != 1}checked=\"checked\"{/if} />No</td>\r\n					 </tr>  \r\n                     {if \$personal.troopuser == 1}\r\n                    <tr valign=\"baseline\">\r\n					   <td align=\"right\" class=\"row\">Scout Record publicly viewable?</td>\r\n					   <td align=\"left\" class=\"row\"><input type=\"radio\" name=\"showrecord\" value=\"1\" {if \$personal.showrecord != 0}checked=\"checked\"{/if} />Yes&nbsp;<input type=\"radio\" name=\"showrecord\" value=\"0\" {if \$personal.showrecord != 1}checked=\"checked\"{/if} />No</td>\r\n					 </tr>      \r\n{/if}                     \r\n					 <tr><th colspan=\"2\" align=\"center\" class=\"bighead\">Personal Information</th></tr>\r\n					 <tr valign=\"baseline\">\r\n					   <td  align=\"right\" class=\"row\">First Name:</td>\r\n					   <td align=\"left\" class=\"row\"><input name=\"firstname\" type=\"text\" size=\"40\" maxlength=\"50\" value=\"{\$personal.firstname}\" class=\"inputbox\" /></td>\r\n					 </tr>\r\n					 <tr valign=\"baseline\">\r\n					   <td  align=\"right\" class=\"row\">Last Name:</td>\r\n					   <td align=\"left\" class=\"row\"><input name=\"lastname\" type=\"text\" size=\"40\" maxlength=\"50\" value=\"{\$personal.lastname}\" class=\"inputbox\" /></td>\r\n					 </tr>\r\n					 <tr valign=\"baseline\">\r\n					   <td  align=\"right\" class=\"row\">Date of birth:</td>\r\n					   <td align=\"left\" class=\"row\"><input name=\"dob\" id=\"dob\" type=\"text\" size=\"20\" maxlength=\"20\" value=\"{\$personal.dob}\" class=\"inputbox\" readonly=\"readonly\" /><button id=\"opencal\" name=\"opencal\" class=\"button\">Calender</button></td>\r\n					 </tr>\r\n					 <tr valign=\"baseline\">\r\n					   <td  align=\"right\" class=\"row\">Home Telephone:</td>\r\n					   <td align=\"left\" class=\"row\"><input name=\"tel\" type=\"text\" size=\"20\" maxlength=\"20\" value=\"{\$personal.tel}\" class=\"inputbox\" /></td>\r\n					 </tr>\r\n					 <tr valign=\"baseline\">\r\n					   <td  align=\"right\" class=\"row\">Cellphone Number:</td>\r\n					   <td align=\"left\" class=\"row\"><input name=\"cell\" type=\"text\" size=\"20\" maxlength=\"20\" value=\"{\$personal.cell}\" class=\"inputbox\" /></td>\r\n					 </tr>\r\n					 <tr valign=\"baseline\">\r\n					   <td align=\"right\" valign=\"top\"  class=\"row\">Address:</td>\r\n					   <td align=\"left\" class=\"row\"><textarea name=\"address\" cols=\"40\" rows=\"4\" class=\"inputbox\">{\$personal.address}</textarea></td>\r\n					 </tr>\r\n					 <tr valign=\"baseline\">\r\n					   <td  align=\"right\" class=\"row\">Email:</td>\r\n					   <td align=\"left\" class=\"row\"><input name=\"email\" type=\"text\"  size=\"40\" maxlength=\"100\" value=\"{\$personal.email}\" class=\"inputbox\" /></td>\r\n					 </tr>\r\n        {if \$personal.troopuser == 1 && \$numschemes >0}                     \r\n                    <tr>\r\n                      <td align=\"right\" class=\"row\"><div align=\"right\">Award Scheme to use:</div></td>\r\n                      <td align=\"left\" class=\"row\"><div align=\"left\">\r\n                        <select name=\"scheme\" id=\"scheme\" class=\"inputbox\">\r\n                            {section name=awards loop=\$numschemes}\r\n                                <option value=\"{\$schemes[awards].id}\" {if (\$personal.scheme == \$schemes[awards].id)}selected{/if}>{\$schemes[awards].name} Award Scheme</option>\r\n                            {/section}\r\n                        </select>\r\n                      </div></td>\r\n                    </tr>  \r\n{/if}                    \r\n					 <tr><th colspan=\"2\" align=\"center\" class=\"bighead\">Forum Settings</th></tr>\r\n                     {if \$config.avyx > 0 && \$config.avyy > 0}\r\n                    {if \$personal.avyfile != ''''}<tr valign=\"baseline\">\r\n					   <td  align=\"right\" class=\"row\" valign=\"top\">Current Avatar: </td>\r\n					   <td align=\"left\" class=\"row\"><img src=\"avatars/{\$personal.avyfile}\" alt=\"Your Avatar\" /></td>\r\n					 </tr>{/if}\r\n                     <tr valign=\"baseline\">\r\n					   <td  align=\"right\" class=\"row\">Avatar (Max size: {\$config.avyx}x{\$config.avyy}) - Leave blank if you don''t want to change it.: </td>\r\n					   <td align=\"left\" class=\"row\"><input name=\"avy\" type=\"file\" size=\"40\" maxlength=\"100\" class=\"inputbox\" /></td>\r\n					 </tr>\r\n                     {/if}\r\n					 {if \$config.sigsize > 0}<tr valign=\"baseline\">\r\n					   <td  align=\"right\" class=\"row\" valign=\"top\">Signature:<br />You may use <a href=\"javascript:popuphelp(''bbcode'')\">BBCode</a> </td>\r\n					   <td align=\"left\" class=\"row\"><textarea name=\"sig\" cols=\"40\" rows=\"4\" class=\"inputbox\">{\$personal.sig}</textarea></td>\r\n					 </tr>\r\n                     {/if}\r\n					 <tr valign=\"baseline\">\r\n					   <td  align=\"right\" class=\"row\">Do you want to be emailed when a new topic is posted? </td>\r\n					   <td align=\"left\" class=\"row\"><input type=\"radio\" name=\"newtopic\" value=\"1\" {if \$personal.newtopic != 0}checked=\"checked\"{/if} />Yes&nbsp;<input type=\"radio\" name=\"newtopic\" value=\"0\" {if \$personal.newtopic != 1}checked=\"checked\"{/if} />No</td>\r\n					 </tr> \r\n					 <tr valign=\"baseline\">\r\n					   <td  align=\"right\" class=\"row\">Do you want to be emailed when you recieve a new PM?</td>\r\n					   <td align=\"left\" class=\"row\"><input type=\"radio\" name=\"newpm\" value=\"1\" {if \$personal.newpm != 0}checked=\"checked\"{/if} />Yes&nbsp;<input type=\"radio\" name=\"newpm\" value=\"0\" {if \$personal.newpm != 1}checked=\"checked\"{/if} />No</td>\r\n					 </tr>      \r\n					 <tr valign=\"baseline\">\r\n					   <td colspan=\"2\" align=\"center\" class=\"row\"><input type=\"submit\" value=\"Update record\" class=\"button\" name=\"submit\" id=\"submit\" />&nbsp;&nbsp;<input type=\"reset\" value=\"Reset form\" class=\"button\" /></td>\r\n					 </tr>\r\n				   </table> 	\r\n</form>\r\n<script type=\"text/javascript\">\r\n  {literal}\r\n  Calendar.setup(\r\n    {\r\n      inputField  : \"dob\",         // ID of the input field\r\n      ifFormat    : \"%Y-%m-%d\",    // the date format\r\n      button      : \"opencal\",       // ID of the button\r\n      {/literal}\r\n      date         : \"{\$personal.dob|date_format:\"%Y-%m-%d\"}\"\r\n      {literal}\r\n    }\r\n  );\r\n  {/literal}\r\n</script>', 5);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (6, 1, '<h1>Add Article</h1>\r\n<form action=\"{\$editFormAction}\" method=\"post\" name=\"noteadd\" id=\"noteadd\" enctype=\"multipart/form-data\" onsubmit=\"return validate(this,{\$fieldlist},{\$messagelist});\">\r\n				   <table width=\"100%\"  border=\"0\" cellspacing=\"2\" cellpadding=\"2\" class=\"content\">\r\n                    <tr>\r\n                      <td><div align=\"right\"><span class=\"subtitle\">Title: </span></div></td>\r\n                      <td>\r\n                        <div align=\"left\"><input name=\"title\" type=\"text\" id=\"title\" size=\"50\" value=\"\" class=\"inputbox\" /></div>\r\n                      </td>\r\n                    </tr>\r\n                    <tr>\r\n                      <td><div align=\"right\"><span class=\"subtitle\">Date of event (Leave blank if unsure) :</span></div></td>\r\n                      <td>\r\n                        <div align=\"left\"><input name=\"dh\" type=\"text\" id=\"dh\" size=\"16\" value=\"\" class=\"inputbox\"  readonly=\"readonly\" /><button id=\"opencal\" name=\"opencal\" class=\"button\">...</button></div>\r\n                      </td>\r\n                    </tr>\r\n                    <tr>\r\n                      <td><div align=\"right\"><span class=\"subtitle\">Picture: </span></div></td>\r\n                      <td>\r\n                      <div align=\"left\"><input name=\"file\" type=\"file\" size=\"50\" class=\"inputbox\" /></div>\r\n</td>\r\n                    </tr>\r\n					<tr>\r\n                      <td><div align=\"right\"><span class=\"subtitle\">Author:</span></div></td>\r\n                      <td>\r\n                       <div align=\"left\"> <input name=\"auth\" type=\"text\" id=\"auth\" size=\"50\" value=\"{\$name}\" class=\"inputbox\" /></div>\r\n                      </td>\r\n                    </tr>	\r\n					<tr>\r\n					 <td><div align=\"right\"><span class=\"subtitle\">Album to use (You may need to add the album):</span></div></td>\r\n					 <td>\r\n						<div align=\"left\"><select name=\"cat\" class=\"inputbox\">\r\n						  {if \$numalbum > 0}\r\n                            <option value=\"no\" selected>None</option>\r\n                           {else}\r\n                            <option value=\"no\" selected>You do not own any albums</option>\r\n                            {/if}\r\n                          {if \$numalbum > 0}\r\n						  {section name=albums loop=\$numalbum}\r\n						  	<option value=\"{\$albums[albums].ID}\">{\$albums[albums].album_name}</option>\r\n						  {/section}\r\n                         {/if}\r\n						</select></div>\r\n					</td>\r\n				  </tr>\r\n                  </table>\r\n				  <br />\r\n				   <h2 align=\"center\" class=\"subtitle\">Article: </h2> \r\n                    <textarea id=\"story\" name=\"story\" style=\"width: 100%; height: 50em;\"></textarea>	                   \r\n				   <div align=\"center\">\r\n					<input type=\"submit\" name=\"Submit\" value=\"Submit\" class=\"button\" />\r\n                	<input type=\"button\" name=\"Submit2\" value=\"Cancel\" onClick=\"window.location=''index.php?page=mythings&menuid={\$menuid}''\" class=\"button\" />\r\n				  </div>\r\n</form>	 \r\n<script type=\"text/javascript\">\r\n  {literal}\r\n  Calendar.setup(\r\n    {\r\n      inputField  : \"dh\",         // ID of the input field\r\n      ifFormat    : \"%Y-%m-%d\",    // the date format\r\n      button      : \"opencal\"      // ID of the button\r\n    }\r\n  );\r\n  {/literal}\r\n</script>', 6);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (8, 1, '{if !\$success}\r\n    <h1>Add a photo album</h1>\r\n    <form action=\"{\$editFormAction}\" method=\"post\" name=\"photos\">\r\n      <table width=\"100%\"  border=\"0\" cellspacing=\"2\" cellpadding=\"2\"  class=\"content\">\r\n        <tr>\r\n          <th colspan=\"2\" align=\"center\"><div align=\"center\">Album Information </div></th>\r\n        </tr>\r\n        <tr>\r\n          <td width=\"50%\" align=\"right\">Name of album: </td>\r\n          <td align=\"left\"><div align=\"left\">\r\n            <input type=\"text\" name=\"album_name\" class=\"inputbox\" />\r\n    </div></td>\r\n        </tr>\r\n        <tr>\r\n          <td width=\"50%\" align=\"center\"><div align=\"right\">Patrol: </div></td>\r\n          <td align=\"center\"><div align=\"left\"><select name=\"patrol\" class=\"inputbox\">\r\n               {if (\$userteam == \"Admin\") || (\$userteam == \"Scouters\") || (\$userteam == \"TLs\")}\r\n                   <option value=\"All\" selected >Troop Photos</option>\r\n                    {section name=team loop=\$numteams}\r\n                        <option value=\"{\$teamname[team]}\">{\$teamname[team]}</option>\r\n                    {/section}\r\n                {else}\r\n                   {section name=team loop=\$numteams}\r\n                        {if \$userteam == \$teamname[team]} <option value=\"{\$teamname[team]}\" selected>{\$teamname[team]}</option>{/if}\r\n                    {/section}\r\n                {/if}\r\n                   <option value=\"hidden\">Hidden (So that it can only be used for articles)</option>\r\n         </select>\r\n          </div></td>\r\n        </tr>\r\n        <tr>\r\n          <td align=\"center\" colspan=\"2\"><input type=\"submit\" name=\"submit\" value=\"Add Album\" class=\"button\" />	\r\n          <input type=\"button\" name=\"Submit2\" value=\"Cancel\" onClick=\"window.location=''index.php?page=mythings&menuid={\$menuid}''\" class=\"button\" /></td>\r\n        </tr>\r\n      </table>\r\n    </form>\r\n{else}\r\n<h1>Success</h1>\r\nYour photo album {\$album_name} has been created, click <a href=\"index.php?page=mythings&amp;cat=album&amp;id={\$albumid}&amp;menuid={\$menuid}\">here</a> to start adding photos to it.\r\n{/if}', 8);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (9, 1, '{\$errors}\r\n<form name=\"form\"  method=\"post\" action=\"{\$editFormAction}&amp;pagenum={\$pagenum}\">\r\n		  <table width=\"100%\" border=\"0\" align=\"center\"  class=\"table\" cellpadding=\"4\" cellspacing=\"1\">\r\n			<tr>\r\n			  <th colspan=\"2\">Step 1 - Personal Information</th>\r\n			</tr>\r\n            <tr>\r\n            <td colspan=\"2\" class=\"row\"><div align=\"center\">Items marked with a <span style=\"color: rgb(255, 0, 0);\">*</span> are compulsory<br />\r\nAll personal information supplied will only be available to the administrators of this website, and where applicable the group leader.</div>\r\n</td>\r\n            </tr>\r\n			<tr>\r\n			  <td width=\"50%\" class=\"row\" title=\"The username that you will use to log in. Please try to make this different to your real name\"><div align=\"right\">Username<span style=\"color: rgb(255, 0, 0);\">*</span>:</div></td>\r\n			  <td align=\"left\" class=\"row\" title=\"The username that you will use to log in. Please try to make this different to your real name\">\r\n                <div align=\"left\"><input name=\"usernames\" type=\"text\" id=\"usernames\" size=\"30\" maxlength=\"30\" value=\"{\$info.username}\" class=\"inputbox\" title=\"The username that you will use to log in. Please try to make this different to your real name\" /></div>			\r\n              </td>\r\n			</tr>\r\n				<tr>\r\n					<td class=\"row\"><div align=\"right\" title=\"The password that you will use to log in. Must be longer than 6 characters.\">Password<span style=\"color: rgb(255, 0, 0);\">*</span>: </div></td>\r\n					<td align=\"left\" class=\"row\" title=\"The password that you will use to log in. Must be longer than 6 characters.\"><input name=\"passwords\" type=\"password\" id=\"passwords\" size=\"30\" maxlength=\"30\" class=\"inputbox\" title=\"The password that you will use to log in. Must be longer than 6 characters.\" /></td>\r\n				</tr>\r\n				<tr>\r\n					<td class=\"row\" title=\"Retype the same password that you typed in above\"><div align=\"right\">Retype Password<span style=\"color: rgb(255, 0, 0);\">*</span>: </div></td>\r\n					<td align=\"left\" class=\"row\" title=\"Retype the same password that you typed in above\"><input name=\"repass\" type=\"password\" id=\"repass\" size=\"30\" maxlength=\"30\" class=\"inputbox\" title=\"Retype the same password that you typed in above\" /></td>\r\n				</tr>\r\n				<tr>\r\n				  <td class=\"row\" title=\"A valid and unique email address.\"><div align=\"right\">Email Address<span style=\"color: rgb(255, 0, 0);\">*</span>: </div></td>\r\n				  <td align=\"left\" class=\"row\" title=\"A valid and unique email address.\"><div align=\"left\">\r\n					<input name=\"email\" type=\"text\" id=\"email\" size=\"60\" value=\"{\$info.email}\" class=\"inputbox\" title=\"A valid and unique email address.\" />\r\n				  </div></td>\r\n			</tr>\r\n            <tr>\r\n              <td align=\"right\" class=\"row\"><div align=\"right\">Your Timezone </div></td>\r\n              <td align=\"left\" class=\"row\"><div align=\"left\">\r\n                <select name=\"zone\" id=\"zone\" class=\"inputbox\">\r\n                    {section name=zones loop=\$numzones}\r\n                        <option value=\"{\$zone[zones].id}\" {if (\$zone[zones].offset == 0)}selected{/if}>{\$zone[zones].offset} Hours</option>\r\n                    {/section}\r\n                </select>\r\n              </div></td>\r\n            </tr>\r\n				{if \$config.allowtroop == 1}\r\n                <tr>\r\n				  <td class=\"row\" title=\"If you are a member (or your son/daugter is a member) of {\$config.troopname} then select yes\"><div align=\"right\">Are you a member of {\$config.troopname}<span style=\"color: rgb(255, 0, 0);\">*</span>?</div></td>\r\n				  <td align=\"left\" class=\"row\" title=\"If you are a member (or your son is a member) of {\$config.troopname} then select yes\">\r\n					<label><input type=\"radio\" name=\"member\" value=\"1\" {if \$info.member == 1}checked=\"checked\"{/if} />Yes</label>\r\n					<label><input type=\"radio\" name=\"member\" value=\"0\" {if \$info.member != 1}checked=\"checked\"{/if} />No</label>\r\n                </td>\r\n    			</tr>\r\n                {else}\r\n                <tr>\r\n                <td class=\"row\" colspan=\"2\">\r\n                <input type=\"hidden\" name=\"member\" value=\"0\"  />\r\n                </td>\r\n                </tr>\r\n                {/if}\r\n                {if \$config.registerimage == 1}\r\n                    <tr>\r\n				  <td class=\"row\" title=\"Enter exactly what is shown in the picture\"><div align=\"right\">Confirmation Image (To prevent Spambots)<span style=\"color: rgb(255, 0, 0);\">*</span>: </div></td>\r\n				  <td align=\"left\" class=\"row\" title=\"Enter exactly what is shown in the picture\"><div align=\"left\">\r\n                  <img src=\"confirmimage.php?rid={\$rid}\" alt=\"Confirmation Image\" /><br />\r\n					<input name=\"code\" type=\"text\" id=\"code\" size=\"10\" class=\"inputbox\" title=\"Enter exactly what is shown in the picture\" />\r\n				  </div></td>\r\n			</tr>\r\n            {/if}\r\n            <tr>\r\n		      <td width=\"50%\" class=\"row\" title=\"Your first name. Please put your real first name here as it makes the Scout Masters job easier\"><div align=\"right\" class=\"required\">First Name<span style=\"color: rgb(255, 0, 0);\">*</span>:</div></td>\r\n              <td align=\"left\" class=\"row\" title=\"Your first name. Please put your real first name here as it makes the Scout Masters job easier\"><input name=\"firstname\" type=\"text\" size=\"40\" value=\"{\$info.first}\" class=\"inputbox\" title=\"Your first name. Please put your real first name here as it makes the Scout Masters job easier\" /></td>\r\n	    </tr>\r\n	    <tr>\r\n		  <td class=\"row\"><div align=\"right\" class=\"required\" title=\"Your last name. Please put your real last name here as it makes the Scout Masters job easier\">Surname<span style=\"color: rgb(255, 0, 0);\">*</span>:</div></td>\r\n		  <td align=\"left\" class=\"row\" title=\"Your last name. Please put your real last name here as it makes the Scout Masters job easier\"><div align=\"left\">\r\n		    <input name=\"lastname\" type=\"text\" size=\"40\" value=\"{\$info.last}\" class=\"inputbox\" title=\"Your last name. Please put your real last name here as it makes the Scout Masters job easier\" />\r\n		  </div></td>\r\n	    </tr>\r\n		<tr>\r\n		  <td width=\"50%\" class=\"row\"><div align=\"right\" class=\"required\" title=\"Your date of birth. You must use the ''Calender'' button to open a calendar\">Date Of Birth<span style=\"color: rgb(255, 0, 0);\">*</span>:</div></td>\r\n		  <td align=\"left\" class=\"row\" title=\"Your date of birth. You must use the ''Calender'' button to open a calendar\"><input name=\"dob\" id=\"dob\" type=\"text\" size=\"20\" maxlength=\"20\" value=\"{\$info.dob}\" class=\"inputbox\" readonly=\"readonly\" /><button id=\"opencal\" name=\"opencal\" class=\"button\">Calender</button></td>\r\n		</tr>\r\n		<tr>\r\n		  <td width=\"50%\" class=\"row\"><div align=\"right\" title=\"A valid telephone number. This is not required.\">Telephone Number:</div></td>\r\n		  <td align=\"left\" class=\"row\" title=\"A valid telephone number. This is not required.\"><input name=\"tel\" type=\"text\" size=\"40\" value=\"{\$info.tel}\" class=\"inputbox\" title=\"A valid telephone number. This is not required.\" /></td>\r\n		</tr>\r\n		<tr>\r\n		  <td width=\"50%\" class=\"row\" title=\"A valid telephone number. This is not required.\"><div align=\"right\">Cellphone Number:</div></td>\r\n		  <td align=\"left\" class=\"row\" title=\"A valid cellphone number. This is not required.\"><input name=\"cell\" type=\"text\" size=\"40\" value=\"{\$info.cell}\" class=\"inputbox\" title=\"A valid cellphone number. This is not required.\" /></td>\r\n		</tr>\r\n		<tr>\r\n		  <td width=\"50%\" class=\"row\" title=\"A valid address. This is not required.\"><div align=\"right\">Address:</div></td>\r\n		  <td align=\"left\" class=\"row\" title=\"A valid address. This is not required.\"><textarea name=\"address\" cols=\"50\" rows=\"5\" class=\"inputbox\" title=\"A valid address. This is not required.\">{\$info.address}</textarea></td>\r\n		</tr>\r\n        <tr>\r\n				  <th colspan=\"2\">                \r\n                  <div>\r\n					<input name=\"Clear\" type=\"reset\" id=\"Clear2\" value=\"Reset Form\" class=\"button\" />\r\n				  &nbsp;&nbsp;\r\n				  <input name=\"next\" type=\"submit\" id=\"next\" value=\"Next\" class=\"button\" />\r\n				  <input name=\"pagenum\" type=\"hidden\" id=\"pagenum\" value=\"1\" />\r\n	            </div>	          \r\n                </th>\r\n			</tr>\r\n	  </table>\r\n</form>\r\n<script type=\"text/javascript\">\r\n  {literal}\r\n  Calendar.setup(\r\n    {\r\n      inputField  : \"dob\",         // ID of the input field\r\n      ifFormat    : \"%Y-%m-%d\",    // the date format\r\n      button      : \"opencal\",       // ID of the button\r\n{/literal}\r\n      date         : \"{\$info.dob}\"\r\n      {literal}\r\n    }\r\n  );\r\n  {/literal}\r\n</script>', 9);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (9, 3, ' {\$errors}\r\n<form name=\"form\" method=\"post\" action=\"{\$editFormAction}&amp;pagenum={\$pagenum}\">\r\n		 <table width=\"100%\" border=\"0\" align=\"center\"  class=\"table\" cellpadding=\"4\" cellspacing=\"1\">	\r\n		<tr>\r\n		  <th colspan=\"2\"><div align=\"center\">Step 3 - Confirmation</div></th>\r\n	    </tr>\r\n		<tr>\r\n		  <td width=\"50%\" class=\"row\" title=\"Retype your password here. This is to make sure that you actually know what it is\"><div align=\"right\">Password</div></td>\r\n		  <td class=\"row\" title=\"Retype your password here. This is to make sure that you actually know what it is\"><div align=\"left\">\r\n		    <input name=\"repass\" type=\"password\" id=\"repass\" size=\"30\" maxlength=\"30\" class=\"inputbox\" title=\"Retype your password here. This is to make sure that you actually know what it is\" />\r\n		  </div></td>\r\n	    </tr>\r\n		<tr>\r\n		  <td class=\"row\" title=\"Retype your email address. This is to make sure that you really are a person, and your email address is valid\"><div align=\"right\">Email Address </div></td>\r\n		  <td class=\"row\" title=\"Retype your email address. This is to make sure that you really are a person, and your email address is valid\"><div align=\"left\">\r\n		    <input name=\"reemail\" type=\"text\" id=\"reemail\" size=\"60\" class=\"inputbox\" title=\"Retype your email address. This is to make sure that you really are a person, and your email address is valid\" />\r\n		  </div></td>\r\n	    </tr>\r\n		<tr>\r\n		  <td colspan=\"2\" class=\"row\"><div align=\"right\"></div>		    \r\n		    <div align=\"center\">\r\n  <input name=\"back\" type=\"submit\" id=\"back\" value=\"Back\" class=\"button\" />\r\n&nbsp;&nbsp;\r\n  <input name=\"Clear22\" type=\"reset\" id=\"Clear22\" value=\"Reset Form\" class=\"button\" />\r\n&nbsp;&nbsp;\r\n  <input name=\"next\" type=\"submit\" id=\"next\" value=\"Next\" class=\"button\" />\r\n  <input name=\"pagenum\" type=\"hidden\" id=\"pagenum3\" value=\"3\" />\r\n            </div></td>\r\n	    </tr>\r\n  </table>\r\n</form>', 11);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (9, 2, ' {\$errors}\r\n<form name=\"form\" method=\"post\" action=\"{\$editFormAction}&amp;pagenum={\$pagenum}\">\r\n		 <table width=\"100%\" border=\"0\" align=\"center\"  class=\"table\" cellpadding=\"4\" cellspacing=\"1\">\r\n		<tr>\r\n		  <th colspan=\"2\">Step 2 - Scouting Information </th>\r\n	    </tr>\r\n		<tr>\r\n		  <td colspan=\"2\" class=\"row\"><div align=\"center\">You indicated that your a member of {\$config.troopname}. Please fill in this form with your scouting details.</div></td>\r\n	    </tr>\r\n		<tr>\r\n		  <td width=\"50%\" class=\"row\" title=\"Select your group. If your group does not appear here then leave as is.\"><div align=\"right\">Group</div></td>\r\n	      <td class=\"row\" title=\"Select your group. If your group does not appear here then leave as is.\"><div align=\"left\">\r\n	        <select name=\"patrol\" id=\"patrol\" class=\"inputbox\" title=\"Select your group. If your group does not appear here then leave as is.\">\r\n	          <option value=\"0\" selected>Select Group</option>\r\n			  {section name=loop loop=\$numgroups}\r\n			  <option value=\"{\$groups[loop].teamname}\" >{\$groups[loop].teamname}</option>	          \r\n			  {/section}\r\n	        </select>\r\n	      </div></td>\r\n		</tr>\r\n		<tr>\r\n		  <td class=\"row\" title=\"Select your position in your group, if you are unsure what to select just choose ''Scout''\"><div align=\"right\">Postion in troop </div></td>\r\n	      <td class=\"row\" title=\"Select your position in your group, if you are unsure what to select just choose ''Scout''\"><div align=\"left\">\r\n	        <select name=\"pos\" id=\"pos\" class=\"inputbox\" title=\"Select your position in your troop, if you are unsure what to select just choose ''Scout''\">\r\n	          <option value=\"5\">Scout (Standard User)</option>\r\n	          <option value=\"4\">Assistant Group Leader (Second)</option>\r\n	          <option value=\"3\">Group Leader (Patrol Leader)</option>\r\n	          <option value=\"2\">Troop Leader</option>\r\n	          <option value=\"1\">Scouter</option>\r\n			</select>\r\n	      </div></td>\r\n		</tr>\r\n		<tr>\r\n		  <td class=\"row\" title=\"Select the award scheme that you are fall under. Leave it as it is if you are unsure.\"><div align=\"right\">What award scheme do you use?</div></td>\r\n	      <td class=\"row\" title=\"Select the award scheme that you are fall under. Leave it as it is if you are unsure.\"><div align=\"left\">\r\n            <select name=\"scheme\" id=\"scheme\" class=\"inputbox\">\r\n                {section name=awards loop=\$numschemes}\r\n                    <option value=\"{\$schemes[awards].id}\" {if (\$personal.scheme == \$schemes[awards].id)}selected{/if}>{\$schemes[awards].name} Award Scheme</option>\r\n                {/section}\r\n            </select>\r\n	      </div></td>\r\n		</tr>\r\n		<tr>\r\n		  <td colspan=\"2\" class=\"row\">\r\n            <div align=\"center\">\r\n  <input name=\"back\" type=\"submit\" id=\"back\" value=\"Back\" class=\"button\" />\r\n&nbsp;&nbsp;\r\n  <input name=\"Clear222\" type=\"reset\" id=\"Clear222\" value=\"Reset Form\" class=\"button\" />\r\n&nbsp;&nbsp;\r\n  <input name=\"next\" type=\"submit\" id=\"next\" value=\"Next\" class=\"button\" />\r\n          </div></td>\r\n	    </tr>\r\n		</table>\r\n</form>', 12);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (9, 4, '		 <table width=\"100%\" border=\"0\" align=\"center\"  class=\"content\" cellpadding=\"2\" cellspacing=\"0\">\r\n		<tr>\r\n		  <th colspan=\"2\"><div align=\"center\">Step 4 - Registration Complete</div></th>\r\n	    </tr>\r\n		<tr>\r\n		  <td colspan=\"2\"><div align=\"center\">\r\n		    <p>Thank you for registering. {\$activeinfo}.</p>\r\n		    <p><em>Please keep your password a secret.</em></p>\r\n		    <p><em><a href=\"index.php\">Back to main </a></em></p>\r\n		  </div></td>\r\n	    </tr>\r\n	  </table>', 13);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (10, 1, '{if \$show_detail == false}\r\n<div align=\"right\">{if \$rss == 0 && \$uname != \"Guest\"}<a href=\"index.php?page=rss&amp;action=add&amp;id=1&amp;type=3&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}rss_add.png\" alt=\"Add to RSS feed\" title=\"Add to RSS feed\" /></a>&nbsp;{elseif \$rss == 1 && \$uname != \"Guest\"}<a href=\"index.php?page=rss&amp;action=delete&amp;id=1&amp;type=3&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}rss_delete.png\" alt=\"Remove from RSS feed\" title=\"Remove from RSS feed\" /></a>&nbsp;{/if}<a href=\"index.php?page=calender&amp;action=ical\"><img border=\"0\" src=\"{\$templateinfo.imagedir}calendar.png\" alt=\"Download iCal file\" title=\"Download iCal file\" /></a></div>\r\n	{\$calendar}\r\n{else}\r\n<h1>{\$item.summary}</h1>\r\n<div>{\$detail.detail}</div>\r\n	<br />\r\n	<a href=\"index.php?page=calender&amp;menuid={\$menuid}\">Back to calendar</a>\r\n{/if}', 16);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (11, 1, '{if \$action != ''cat'' && \$action != ''down''}	\r\n{if \$numcats > 0}\r\n<div align=\"center\">\r\n    <table width=\"75%\" cellpadding=\"1\" class=\"table\">\r\n    <tr><th class=\"bighead\" colspan=\"3\">Download Categories</th></tr>\r\n    <tr>\r\n    <th class=\"smallhead\" width=\"50%\">Category</th>\r\n    <th class=\"smallhead\">Latest download</th>\r\n    <th class=\"smallhead\" width=\"10%\">Number of downloads</th>\r\n    </tr>\r\n		{section name=cats loop=\$numcats}\r\n        <tr>\r\n		<td class=\"row\"><a href=\"index.php?page=downloads&amp;catid={\$cats[cats].id}&amp;action=cat&amp;menuid={\$menuid}\">{\$cats[cats].name}</a></td>\r\n		<td class=\"row\"><a href=\"index.php?page=downloads&amp;id={\$cats[cats].quickid}&amp;action=down&amp;catid={\$cats[cats].id}\">{\$cats[cats].quicklinkname}</a></td>\r\n		<td class=\"row\">{\$cats[cats].numdownloads}</td>\r\n        </tr>\r\n         {/section}\r\n		 </ul></div>\r\n\r\n    </table>\r\n         {else}\r\n         <div>There are no categories with downloads at the moment</div>\r\n        {/if}\r\n{else}	\r\n{if \$numdown > 0}\r\n<table width=\"100%\" border=\"0\" cellpadding=\"4\" cellspacing=\"1\" class=\"table\">\r\n	  <tr> \r\n	  <th colspan=\"6\" class=\"bighead\">Downloads for {\$catinfo.name}</th>\r\n	</tr>\r\n	  <tr>\r\n		<th width=\"10%\" class=\"smallhead\">Action</th>\r\n		<th width=\"26%\" class=\"smallhead\">Name</th>\r\n		<th class=\"smallhead\">Descripton</th>\r\n		<th width=\"5%\" class=\"smallhead\">Downloads</th>\r\n		<th width=\"10%\" class=\"smallhead\">Size</th>\r\n	  </tr> \r\n	 {section name=downloadloop loop=\$numdown}\r\n		 <tr>\r\n			<td class=\"row\"><a href=\"index.php?page=downloads&amp;id={\$downloads[downloadloop].id}&amp;action=down&amp;catid={\$catinfo.id}\">Download</a></td>\r\n			<td class=\"row\">{\$downloads[downloadloop].name}</td>\r\n			<td class=\"row\">{\$downloads[downloadloop].descs}</td>\r\n			<td class=\"row\">{\$downloads[downloadloop].numdownloads}</td>\r\n			<td class=\"row\">{\$downloads[downloadloop].size} Kb</td>\r\n	  </tr>\r\n	  {/section}\r\n	</table>\r\n    <a href=\"index.php?page=downloads&amp;menuid={\$menuid}\">Return to categories</a>\r\n{/if}\r\n{/if}', 17);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (13, 1, '<form action=\"{\$editFormAction}\" method=\"post\" name=\"sear\" id=\"sear\">\r\n    <div align=\"center\">Search for <input type=\"text\" name=\"search\" id=\"search\" {if \$search != \"\"}value=''{\$search}''{else}value=\"Enter search item...\"{/if} size=50 class=\"inputbox\" /><br /> inside&nbsp;\r\n    <select name=\"what\" id=\"what\" class=\"inputbox\">\r\n        <option value=\"1\" {if \$option==1 || \$option==0}selected=\"selected\"{/if}>Articles</option>\r\n        <option value=\"3\" {if \$option==3}selected=\"selected\"{/if}>News Items</option>\r\n        <option value=\"4\" {if \$option==4}selected=\"selected\"{/if}>Forum Posts</option>\r\n        {if \$uname != \"Guest\"}<option value=\"5\" {if \$option==5}selected=\"selected\"{/if}>Personal Messages</option>{/if}\r\n        <option value=\"6\" {if \$option==6}selected=\"selected\"{/if}>Website Content</option>\r\n        <option value=\"7\" {if \$option==7}selected=\"selected\"{/if}>Patrol Pages</option>\r\n        <option value=\"8\" {if \$option==8}selected=\"selected\"{/if}>Sub Site Content</option>\r\n<option value=\"9\" {if \$option==9}selected=\"selected\"{/if}>Usernames</option>\r\n {if \$uname != \"Guest\"}<option value=\"10\" {if \$option==10}selected=\"selected\"{/if}>First Name</option>{/if}\r\n    </select>\r\n    <br />     \r\n     <select name=\"type\" id=\"type\" class=\"inputbox\">\r\n        <option value=\"1\" {if \$type==1 || \$type==0}selected=\"selected\"{/if}>All</option>\r\n        <option value=\"2\" {if \$type==2}selected=\"selected\"{/if}>Any</option>\r\n    </select> of the search terms needs to appear.\r\n    <br /><input type=\"submit\" name=\"Submit\" id=\"Submit\"  value=\"Search\" class=\"button\" /><br />\r\n    <span class=\"comment\">To search for a phrase place it into double quotation marks (Eg. \"Scouts is fun\")</span>\r\n</div>\r\n</form>\r\n{if \$searched == 1}\r\n{if \$tfield != \"\"}\r\n<h3 align=\"center\">Searching in all {\$searching}</h3>\r\n<div style=\"font-weight:bold\">You search terms ({\$term_list}) matched the following items:</div>\r\n{section name=results loop=\$results}\r\n <div><a href=\"index.php?page={eval var=\$whatpage}{\$results[results].\$ifield}&amp;highlight={\$terms}\">{\$results[results].\$tfield|strip_tags:false}</a><br />\r\n<span class=\"comment\">{if \$showdate == 1}<strong>Date Posted:</strong> {\$results[results].\$datefield+\$timeoffset|date_format_pretty}{/if}<br />{\$results[results].\$dfield|strip_tags:false|truncate:200|bbcode2html}</span></div>\r\n <br />\r\n{/section}\r\n{else}\r\n<h2>No matches for {\$term_list} where found in {\$searching}</h2>\r\n{/if}\r\n{/if}', 19);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (14, 1, '<h1>{\$helpstuff.title}</h1>\r\n<div>{\$helpstuff.help}</div>', 20);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (17, 1, '{literal}\r\n<script type=\"text/javascript\">\r\n<!--\r\nfunction confirmDelete(type, id) {\r\nif (confirm(\"This will delete the item. Continue?\")){/literal}\r\ndocument.location = \"index.php?page=mythings&action=delete&menuid={\$menuid}&cat=\" + type + \"&id=\" + id;{literal}\r\n}\r\n\r\nfunction changeowner(type, id) {\r\n	WindowObjectReference = window.open(\"index.php?page=mythings&ex=nomenu&cat=\"+type+\"&action=owner&id=\" + id, \"ChangeOwnership\",\r\n\"menubar=no,location=no,resizable=yes,scrollbars=yes,status=no,height=190,width=500\");\r\n}\r\n\r\n\r\nfunction adddownload() {\r\n	WindowObjectReference = window.open(\"index.php?page=mythings&ex=nomenu&action=adddown\",  \"Adddown\",\r\n\"menubar=no,location=no,resizable=yes,scrollbars=yes,status=no,height=360,width=550\");\r\n}\r\n\r\nfunction addnews() {\r\n	WindowObjectReference = window.open(\"index.php?page=mythings&ex=nomenu&action=addnews\",  \"addnews\",\r\n\"menubar=no,location=no,resizable=yes,scrollbars=yes,status=no,height=480,width=640\");\r\n}\r\n//-->\r\n</script>\r\n{/literal}\r\n<a name=\"top\"></a>\r\n<h1>My things</h1>\r\n<h3>Hi {\$uname}, click on one of these links if you''d like to add something</h3>\r\n<div style=\"text-align:center\">\r\n{if \$auth.album == 1}<a href=\"index.php?page=addphotoalbum&amp;menuid={\$menuid}\">Add Photo Album</a> | {/if}\r\n{if \$auth.article == 1}<a href=\"index.php?page=addarticle&amp;menuid={\$menuid}\">Add Article</a> | {/if}\r\n{if \$auth.event == 1}<a href=\"index.php?page=addevent&amp;menuid={\$menuid}\">Add Event</a> | {/if}\r\n{if \$auth.down == 1}<a href=\"javascript:adddownload()\">Add Download</a> | {/if}\r\n{if \$auth.news == 1}<a href=\"javascript:addnews()\">Add News</a> | {/if}\r\n{if \$auth.poll == 1}<a href=\"index.php?page=addpoll&amp;menuid={\$menuid}\">Add Poll</a>{/if}\r\n<br />\r\n{if \$auth.album == 1 || \$numalbums > 0}<a href=\"#album\">View Photo Album List</a> | {/if}\r\n{if \$auth.article == 1 || \$numart > 0}<a href=\"#article\">View Article List</a> | {/if}\r\n{if \$auth.event == 1 || \$numevents > 0}<a href=\"#event\">View Event List</a> | {/if}\r\n{if \$auth.down == 1 || \$numdown > 0}<a href=\"#down\">View Download List</a> | {/if}\r\n{if \$auth.news == 1 || \$numnews > 0}<a href=\"#news\">View News List</a> | {/if}\r\n{if \$auth.poll == 1 || \$numpolls > 0}<a href=\"#polls\">View Polls</a>{/if}\r\n</div>\r\n<br />\r\n{if \$auth.album == 1 || \$numalbums > 0}\r\n{if \$numalbums > 0}\r\n<table width = \"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\" class=\"table\">\r\n    <tr>\r\n        <th colspan=\"3\" class=\"bighead\"><a name=\"album\"></a>Photo Albums</th>\r\n    </tr>\r\n    <tr>\r\n        <th class=\"smallhead\" width=\"10%\">Action</th>\r\n        <th class=\"smallhead\" width=\"10%\">Published?</th>\r\n        <th class=\"smallhead\" width=\"65%\">Title</th>\r\n    </tr>\r\n    {section name=album loop=\$numalbums}\r\n    <tr>\r\n        <td align=\"center\" class=\"row\"><a href=\"index.php?page=mythings&amp;cat=album&amp;action=edit&amp;id={\$albums[album].ID}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}edit.gif\" title=\"Edit\" alt=\"Edit\"/></a> - <a href=\"javascript:confirmDelete(''album'',''{\$albums[album].ID}'')\"><img border=\"0\" src=\"{\$templateinfo.imagedir}delete.gif\" title=\"Delete\" alt=\"Delete\"/></a> - <a href=\"javascript:changeowner(''album'',''{\$albums[album].ID}'')\"><img border=\"0\" src=\"{\$templateinfo.imagedir}owner.gif\" title=\"Transfer Ownership\" alt=\"Transfer Ownership\"/></a></td>\r\n        <td align=\"center\" class=\"row\">{if \$albums[album].allowed == 1}<img src=\"{\$templateinfo.imagedir}published.png\" alt=\"Published\" title=\"Published\" border=\"0\" />{else}<img src=\"{\$templateinfo.imagedir}notpublished.png\" alt=\"Not Published\" title=\"Not Published\" border=\"0\" />{/if}</td>\r\n        <td class=\"row\">{\$albums[album].album_name}</td>\r\n    </tr>\r\n    {/section}\r\n</table>\r\n<div style=\"text-align:center\"><a href=\"#top\">Back to top</a></div>\r\n{else}\r\n    <div style=\"text-align:center\">You have posted no Photo Albums yet</div>\r\n{/if}\r\n<br /><br />\r\n{/if}\r\n{if \$auth.article == 1 || \$numart > 0}\r\n{if \$numart > 0}\r\n<table width = \"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\" class=\"table\">\r\n    <tr>\r\n        <th colspan=\"3\" class=\"bighead\"><a name=\"article\"></a>Articles</th>\r\n    </tr>\r\n    <tr>\r\n        <th class=\"smallhead\" width=\"10%\">Action</th>\r\n        <th class=\"smallhead\" width=\"10%\">Published?</th>\r\n        <th class=\"smallhead\" width=\"65%\">Title</th>\r\n    </tr>\r\n    {section name=album loop=\$numart}\r\n    <tr>\r\n        <td align=\"center\" class=\"row\"><a href=\"index.php?page=mythings&amp;cat=articles&amp;action=edit&amp;id={\$articles[album].ID}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}edit.gif\" title=\"Edit\" alt=\"Edit\"/></a> - <a href=\"javascript:confirmDelete(''articles'',''{\$articles[album].ID}'')\"><img border=\"0\" src=\"{\$templateinfo.imagedir}delete.gif\" title=\"Delete\" alt=\"Delete\"/></a> - <a href=\"javascript:changeowner(''articles'',''{\$articles[album].ID}'')\"><img border=\"0\" src=\"{\$templateinfo.imagedir}owner.gif\" title=\"Transfer Ownership\" alt=\"Transfer Ownership\"/></a></td>\r\n        <td align=\"center\" class=\"row\">{if \$articles[album].allowed == 1}<img src=\"{\$templateinfo.imagedir}published.png\" alt=\"Published\" title=\"Published\" border=\"0\" />{else}<img src=\"{\$templateinfo.imagedir}notpublished.png\" alt=\"Not Published\" title=\"Not Published\" border=\"0\" />{/if}</td>\r\n        <td class=\"row\">{\$articles[album].title}</td>\r\n    </tr>\r\n    {/section}\r\n</table>\r\n<div style=\"text-align:center\"><a href=\"#top\">Back to top</a></div>\r\n{else}\r\n    <div style=\"text-align:center\">You have posted no Articles yet</div>\r\n{/if}\r\n<br /><br />\r\n{/if}\r\n{if \$auth.event == 1 || \$numevents > 0}\r\n{if \$numevents > 0}\r\n<table width = \"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\" class=\"table\">\r\n    <tr>\r\n        <th colspan=\"4\" class=\"bighead\"><a name=\"event\"></a>Events</th>\r\n    </tr>\r\n    <tr>\r\n        <th class=\"smallhead\" width=\"10%\">Action</th>\r\n        <th class=\"smallhead\" width=\"10%\">Published?</th>\r\n        <th class=\"smallhead\">Title</th>\r\n        <th class=\"smallhead\">Event Date</th>\r\n    </tr>\r\n    {section name=album loop=\$numevents}\r\n    <tr>\r\n        <td align=\"center\" class=\"row\"><a href=\"index.php?page=mythings&amp;cat=events&amp;action=edit&amp;id={\$events[album].id}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}edit.gif\" title=\"Edit\" alt=\"Edit\"/></a> - <a href=\"javascript:confirmDelete(''events'',''{\$events[album].id}'')\"><img border=\"0\" src=\"{\$templateinfo.imagedir}delete.gif\" title=\"Delete\" alt=\"Delete\"/></a> - <a href=\"javascript:changeowner(''events'',''{\$events[album].id}'')\"><img border=\"0\" src=\"{\$templateinfo.imagedir}owner.gif\" title=\"Transfer Ownership\" alt=\"Transfer Ownership\"/></a></td>\r\n        <td align=\"center\" class=\"row\">{if \$events[album].allowed == 1}<img src=\"{\$templateinfo.imagedir}published.png\" alt=\"Published\" title=\"Published\" border=\"0\" />{else}<img src=\"{\$templateinfo.imagedir}notpublished.png\" alt=\"Not Published\" title=\"Not Published\" border=\"0\" />{/if}</td>\r\n        <td class=\"row\">{\$events[album].summary}</td>\r\n        <td class=\"row\">{\$events[album].startdate} to {\$events[album].enddate}</td>\r\n    </tr>\r\n    {/section}\r\n</table>\r\n<div style=\"text-align:center\"><a href=\"#top\">Back to top</a></div>\r\n{else}\r\n    <div style=\"text-align:center\">You have posted no events yet</div>\r\n{/if}\r\n<br /><br />\r\n{/if}\r\n{if \$auth.down == 1 || \$numdown > 0}\r\n{if \$numdown > 0}\r\n<table width = \"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\" class=\"table\">\r\n    <tr>\r\n        <th colspan=\"4\" class=\"bighead\"><a name=\"down\"></a>Downloads</th>\r\n    </tr>\r\n    <tr>\r\n        <th class=\"smallhead\" width=\"10%\">Action</th>\r\n        <th class=\"smallhead\" width=\"10%\">Published?</th>\r\n        <th class=\"smallhead\">Filename</th>\r\n        <th class=\"smallhead\">Title</th>\r\n    </tr>\r\n    {section name=album loop=\$numdown}\r\n    <tr>\r\n        <td align=\"center\" class=\"row\"><a href=\"index.php?page=mythings&amp;cat=downloads&amp;action=edit&amp;id={\$downloads[album].id}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}edit.gif\" title=\"Edit\" alt=\"Edit\"/></a> - <a href=\"javascript:confirmDelete(''downloads'',''{\$downloads[album].id}'')\"><img border=\"0\" src=\"{\$templateinfo.imagedir}delete.gif\" title=\"Delete\" alt=\"Delete\"/></a> - <a href=\"javascript:changeowner(''downloads'',''{\$downloads[album].id}'')\"><img border=\"0\" src=\"{\$templateinfo.imagedir}owner.gif\" title=\"Transfer Ownership\" alt=\"Transfer Ownership\"/></a></td>\r\n        <td align=\"center\" class=\"row\">{if \$downloads[album].allowed == 1}<img src=\"{\$templateinfo.imagedir}published.png\" alt=\"Published\" title=\"Published\" border=\"0\" />{else}<img src=\"{\$templateinfo.imagedir}notpublished.png\" alt=\"Not Published\" title=\"Not Published\" border=\"0\" />{/if}</td>\r\n        <td class=\"row\">{\$downloads[album].file}</td>\r\n        <td class=\"row\">{\$downloads[album].name}</td>\r\n    </tr>\r\n    {/section}\r\n</table>\r\n<div style=\"text-align:center\"><a href=\"#top\">Back to top</a></div>\r\n{else}\r\n    <div style=\"text-align:center\">You have posted no downloads yet</div>\r\n{/if}\r\n<br /><br />\r\n{/if}\r\n{if \$auth.news == 1 || \$numnews > 0}\r\n{if \$numnews > 0}\r\n<table width = \"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\" class=\"table\">\r\n    <tr>\r\n        <th colspan=\"4\" class=\"bighead\"><a name=\"news\"></a>News Items</th>\r\n    </tr>\r\n    <tr>\r\n        <th class=\"smallhead\" width=\"10%\">Action</th>\r\n        <th class=\"smallhead\" width=\"10%\">Published?</th>\r\n        <th class=\"smallhead\" width=\"60%\">Title</th>\r\n        <th class=\"smallhead\" width=\"20%\">Date Posted</th>\r\n    </tr>\r\n    {section name=album loop=\$numnews}\r\n    <tr>\r\n        <td align=\"center\" class=\"row\"><a href=\"index.php?page=mythings&amp;cat=newsitems&amp;action=edit&amp;id={\$newsitems[album].id}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}edit.gif\" title=\"Edit\" alt=\"Edit\"/></a> - <a href=\"javascript:confirmDelete(''newsitems'',''{\$newsitems[album].id}'')\"><img border=\"0\" src=\"{\$templateinfo.imagedir}delete.gif\" title=\"Delete\" alt=\"Delete\"/></a> - <a href=\"javascript:changeowner(''newsitems'',''{\$newsitems[album].id}'')\"><img border=\"0\" src=\"{\$templateinfo.imagedir}owner.gif\" title=\"Transfer Ownership\" alt=\"Transfer Ownership\"/></a></td>\r\n        <td align=\"center\" class=\"row\">{if \$newsitems[album].allowed == 1}<img src=\"{\$templateinfo.imagedir}published.png\" alt=\"Published\" title=\"Published\" border=\"0\" />{else}<img src=\"{\$templateinfo.imagedir}notpublished.png\" alt=\"Not Published\" title=\"Not Published\" border=\"0\" />{/if}</td>\r\n        <td class=\"row\">{\$newsitems[album].title}</td>\r\n        <td class=\"row\">{\$newsitems[album].event+\$timeoffset|date_format_pretty}</td>\r\n    </tr>\r\n    {/section}\r\n</table>\r\n<div style=\"text-align:center\"><a href=\"#top\">Back to top</a></div>\r\n{else}\r\n    <div style=\"text-align:center\">You have posted no news items yet</div>\r\n{/if}\r\n{/if}\r\n<br /><br />\r\n{if \$auth.poll == 1 || \$numpolls > 0}\r\n{if \$numpolls > 0}\r\n<table width = \"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\" class=\"table\">\r\n    <tr>\r\n        <th colspan=\"4\" class=\"bighead\"><a name=\"polls\"></a>Polls</th>\r\n    </tr>\r\n    <tr>\r\n        <th class=\"smallhead\" width=\"10%\">Action</th>\r\n        <th class=\"smallhead\" width=\"10%\">Published?</th>\r\n        <th class=\"smallhead\" width=\"60%\">Question</th>\r\n        <th class=\"smallhead\" width=\"20%\">Date Posted</th>\r\n    </tr>\r\n    {section name=album loop=\$numpolls}\r\n    <tr>\r\n        <td align=\"center\" class=\"row\"><a href=\"javascript:confirmDelete(''pollitems'',''{\$pollitems[album].id}'')\"><img border=\"0\" src=\"{\$templateinfo.imagedir}delete.gif\" title=\"Delete\" alt=\"Delete\"/></a> - <a href=\"javascript:changeowner(''pollitems'',''{\$pollitems[album].id}'')\"><img border=\"0\" src=\"{\$templateinfo.imagedir}owner.gif\" title=\"Transfer Ownership\" alt=\"Transfer Ownership\"/></a></td>\r\n        <td align=\"center\" class=\"row\">{if \$pollitems[album].allowed == 1}<img src=\"{\$templateinfo.imagedir}published.png\" alt=\"Published\" title=\"Published\" border=\"0\" />{else}<img src=\"{\$templateinfo.imagedir}notpublished.png\" alt=\"Not Published\" title=\"Not Published\" border=\"0\" />{/if}</td>\r\n        <td class=\"row\">{\$pollitems[album].question} {if \$pollitems[album].sidebox == 1}(Sidebox Poll){/if}</td>\r\n        <td class=\"row\">{\$pollitems[album].date_start+\$timeoffset|date_format_pretty}</td>\r\n    </tr>\r\n    {/section}\r\n</table>\r\n<div style=\"text-align:center\"><a href=\"#top\">Back to top</a></div>\r\n{else}\r\n    <div style=\"text-align:center\">You have posted no polls yet</div>\r\n{/if}\r\n{/if}', 23);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (17, 2, '{literal}\r\n<script language=\"javascript\" type=\"text/javascript\"> \r\n function upload(aid) {\r\n	var place = \"index.php?page=mythings&ex=nomenu&cat=album&action=add&id=\" + aid;\r\n	WindowObjectReference = window.open(place, \"AddPhoto\",\r\n\"menubar=no,location=no,resizable=yes,scrollbars=yes,status=no,height=190,width=500\");\r\n }\r\n\r\nfunction deletephoto(photoid, albumid) {\r\nif (confirm(\"This will remove the photo from the album. Continue?\"))\r\ndocument.location = \"index.php?page=mythings&cat=album&action=delphoto&pid=\" + photoid + \"&id=\"+ albumid;\r\n}\r\n\r\nfunction editphoto(photoid, albumid)\r\n{\r\n	var url = \"index.php?page=mythings&ex=nomenu&cat=album&action=modify&pid=\" + photoid + \"&id=\" + albumid;\r\n	window.open(url, ''EditPhoto'', ''HEIGHT=400,resizable=yes,WIDTH=500'');\r\n}\r\n//-->\r\n</script>\r\n{/literal}\r\n\r\n<h1>{\$album.album_name}</h1>\r\n\r\nAdd, remove or change a photo in this album\r\n\r\n<div align=\"center\"><a href=\"javascript:upload(''{\$album.ID}'')\">Add Photo</a></div>\r\n{if \$numphotos > 0}\r\n<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\" class=\"table\">\r\n    <tr>\r\n        <th width=\"10%\">Action</th>\r\n        <th width=\"10%\">Published?</th>\r\n        <th width=\"40%\">Photo Caption</th>\r\n        <th width=\"40%\">Photo Preview</th>\r\n    </tr>\r\n    {section name=photo loop=\$numphotos}\r\n    <tr>\r\n        <td align=\"center\" class=\"row\"><a href=\"javascript:editphoto(''{\$photos[photo].ID}'',''{\$album.ID}'')\" style=\"text-align:center\"><img border=\"0\" src=\"{\$templateinfo.imagedir}edit.gif\" title=\"Edit\" alt=\"Edit\"/></a> - <a href=\"javascript:deletephoto({\$photos[photo].ID},{\$album.ID})\" style=\"text-align:center\"><img border=\"0\" src=\"{\$templateinfo.imagedir}delete.gif\" title=\"Delete\" alt=\"Delete\"/></a></td>\r\n        <td align=\"center\" class=\"row\">{if \$photos[photo].allowed == 1}<img src=\"{\$templateinfo.imagedir}published.png\" alt=\"Published\" title=\"Published\" border=\"0\" />{else}<img src=\"{\$templateinfo.imagedir}unpublished.png\" alt=\"Not Published\" title=\"Not Published\" border=\"0\" />{/if}</td>\r\n        <td width=\"40%\" class=\"row\">{\$photos[photo].caption}</td>\r\n        <td width=\"40%\" class=\"row\"><img src=\"thumbnail.php?pic={\$photos[photo].ID}\" /></td>\r\n    </tr>\r\n    {/section}\r\n</table>\r\n{else}\r\n<div align=\"center\">No photos in album</div>\r\n{/if}\r\n<br /><a href=\"index.php?page=mythings\">Back</a>', 24);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (17, 3, '<form action=\"{\$editFormAction}\" method=\"post\" enctype=\"multipart/form-data\" name=\"form1\">\r\n  <table width=\"100%\"  border=\"0\" cellspacing=\"1\" cellpadding=\"2\">\r\n    <tr>\r\n      <th colspan=\"2\">Upload Photo</th>\r\n    </tr>\r\n	<tr>\r\n	  <td width=\"50%\"><div align=\"right\">Filename:</div></td>\r\n      <td><input name=\"filename\" type=\"file\" size=\"50\" maxlength=\"255\" class=\"inputbox\" /></td>\r\n    </tr>\r\n	<tr>\r\n	  <td width=\"50%\"><div align=\"right\">Caption: </div></td>\r\n      <td><input name=\"caption\" type=\"text\" size=\"50\" maxlength=\"255\" class=\"inputbox\" /></td>\r\n	</tr>\r\n	 <tr>\r\n      <td colspan=\"2\"><div align=\"center\">\r\n         <input type=\"submit\" name=\"Submit\" value=\"Upload Photo\" class=\"button\" />\r\n         <input type=\"reset\" name=\"Submit2\" value=\"Cancel\" onClick=\"window.close();\" class=\"button\" />\r\n      </div></td>\r\n    </tr>\r\n  </table>\r\n</form>', 25);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (17, 4, '{if \$noshow == false}\r\n<p>Use this box to change the the photo or the caption. If you just want to change the caption leave the filename field blank If you just want to change the file leave the caption field blank.</p>\r\n<form action=\"{\$editFormAction}\" method=\"post\" enctype=\"multipart/form-data\" name=\"form\" id=\"form\">\r\n  <p><div class=\"current\">Current Picture: <img src=\"thumbnail.php?pic={\$photo.ID}\" /></div> \r\n    New Picture: \r\n    <input name=\"filename\" type=\"file\" size=\"40\" maxlength=\"255\" class=\"inputbox\">\r\n  </p>\r\n  <p>\r\n  <p>  \r\n  <div class=\"current\">Current Caption: {\$photo.caption}</div>\r\n    New Caption: \r\n    <input name=\"caption\" type=\"text\" id=\"caption\" size=\"60\" maxlength=\"100\" class=\"inputbox\">\r\n</p>\r\n  <p align=\"center\">\r\n    <input type=\"submit\" name=\"Submit\" value=\"Submit\" class=\"button\">\r\n    <input type=\"reset\" name=\"Submit2\" value=\"Cancel\" onClick=\"window.close()\" class=\"button\">\r\n  </p>\r\n</form>\r\n{else}\r\n{\$message2}\r\n{/if}', 26);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (17, 5, '<h1>Change ownership</h1>\r\n<form name=\"form\" method=\"post\" action=\"{\$editFormAction}\">\r\nChange ownership to:\r\n<select name=\"owner\" class=\"inputbox\">\r\n    <option value=\"none\" selected>Please choose new owner</option>\r\n    {section name=\"loop\" loop=\$numpeople}\r\n        <option value=\"{\$people[loop].uname}\">{\$people[loop].uname}</option>\r\n    {/section}\r\n</select><br />\r\n<input type=\"submit\" name=\"Submit\" value=\"Submit\" class=\"button\"><input type=\"reset\" name=\"reset\" value=\"Cancel\" onClick=\"window.close()\" class=\"button\"><br />\r\n</form>', 27);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (17, 6, '<h1>Edit Article</h1>\r\n<form action=\"{\$editFormAction}\" method=\"post\" name=\"noteadd\" id=\"noteadd\" enctype=\"multipart/form-data\">\r\n					<noscript><p><b>Javascript must be enabled to use this form.</b></p></noscript>\r\n				   <table width=\"100%\"  border=\"0\" cellspacing=\"2\" cellpadding=\"2\" class=\"content\">\r\n                    <tr>\r\n                      <td><div align=\"right\"><span class=\"subtitle\">Title: </span></div></td>\r\n                      <td>\r\n                        <div align=\"left\"><input name=\"title\" type=\"text\" id=\"title\" size=\"50\" value=\"{\$article.title}\" class=\"inputbox\" /></div>\r\n                      </td>\r\n                    </tr>\r\n                    <tr>\r\n                      <td><div align=\"right\"><span class=\"subtitle\">Date of event (Leave blank if unsure): </span></div></td>\r\n                      <td>\r\n                        <div align=\"left\"><input name=\"dh\" type=\"text\" id=\"dh\" size=\"16\" value=\"{\$article.date_happen}\" class=\"inputbox\"  readonly=\"readonly\" /><button id=\"opencal\" name=\"opencal\">...</button></div>\r\n                      </td>\r\n                    </tr>\r\n{if \$article.pic != \"\" || \$article.pic != NULL}\r\n<tr><td colspan=\"2\"><div align=\"center\">Current Picture: <img src=\"thumbnail.php?pic={\$article.ID}&where=article\" /></div></td></tr>{/if}\r\n                    <tr>\r\n                      <td><div align=\"right\"><span class=\"subtitle\">Picture{if \$article.pic != \"\" || \$article.pic != NULL}\r\n (Leave blank if you don''t want to change it){/if}: </span></div></td>\r\n                      <td>\r\n                      <div align=\"left\"><input name=\"filename\" type=\"file\" size=\"50\" class=\"inputbox\" /></div>\r\n</td>                    </tr>\r\n					<tr>\r\n                      <td><div align=\"right\"><span class=\"subtitle\">Author:</span></div></td>\r\n                      <td>\r\n                       <div align=\"left\"> <input name=\"auth\" type=\"text\" id=\"auth\" size=\"50\" value=\"{\$article.author}\" class=\"inputbox\" /></div>\r\n                      </td>\r\n                    </tr>	\r\n					<tr>\r\n					 <td><div align=\"right\"><span class=\"subtitle\">Album to use (You may need to add the album):</span></div></td>\r\n					 <td>\r\n						<div align=\"left\"><select name=\"cat\" class=\"inputbox\">\r\n						  {if \$numalbum > 0}\r\n                            <option value=\"no\" selected>None</option>\r\n                           {else}\r\n                            <option value=\"no\" selected>No Albums for your patrol</option>\r\n                            {/if}\r\n                          {if \$numalbum > 0}\r\n						  {section name=albums loop=\$numalbum}\r\n						  	<option value=\"{\$albums[albums].ID}\" {if \$albums[albums].ID == \$article.album_id}selected{/if}>{\$albums[albums].album_name}</option>\r\n						  {/section}\r\n                         {/if}\r\n						</select></div>\r\n					</td>\r\n				  </tr>\r\n                  </table>\r\n				  <br />\r\n				   <h2 align=\"center\" class=\"subtitle\">Article: </h2>   \r\n                    <div align=\"center\">   \r\n                    <textarea id=\"story\" name=\"story\" style=\"width: 100%; height: 50em;\">{\$detail}</textarea>   \r\n</div>                    \r\n				  <div align=\"center\">\r\n					<input type=\"submit\" name=\"Submit\" value=\"Update\" class=\"button\" />&nbsp;\r\n                	<input type=\"button\" name=\"Submit2\" value=\"Cancel\" onClick=\"window.location=''index.php?page=mythings''\" class=\"button\" />\r\n				  </div>\r\n</form>\r\n<script type=\"text/javascript\">\r\n  {literal}\r\n  Calendar.setup(\r\n    {\r\n      inputField  : \"dh\",         // ID of the input field\r\n      ifFormat    : \"%Y-%m-%d\",    // the date format\r\n      button      : \"opencal\",       // ID of the button\r\n      {/literal}\r\n      date         : \"{\$article.date_happen}\"\r\n      {literal}\r\n    }\r\n  );\r\n  {/literal}\r\n</script>', 28);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (18, 1, '<h1>Forgotten Username or Password</h1>\r\n<div>You can recieve your username and a new password by filling in the email address you registered with.</div>\r\n<form name=\"form1\" action=\"{\$editFormAction}\" method=\"post\">\r\nEmail: <input type=\"text\" name=\"email\" id=\"email\" size=\"50\" maxlength=\"100\" class=\"inputbox\" /><br />\r\n<input type=\"submit\" name=\"submit\" id=\"submit\" value=\"Submit\" class=\"button\" />\r\n</form>', 30);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (19, 1, '<div>From here you can see everybody in your group who is registered on the website. Click on their username to view their profile.</div>\r\n\r\n<table width=\"50%\" border=\"0\" cellpadding=\"4\" cellspacing=\"1\" class=\"table\" align=\"center\">\r\n{if \$nummem > 1}\r\n<tr>\r\n    <th>Username</th>\r\n    <th width=\"50%\">Real Name</th>\r\n</tr>\r\n{section name=patrol loop=\$nummem}\r\n{if \$patrollist[patrol].uname != \$username}\r\n<tr>\r\n    <td class=\"row\"><img {if \$patrollist[patrol].online == \"offline\"}src=\"{\$templateinfo.imagedir}offline.png\"{elseif \$patrollist[patrol].online == \"online and active\"}src=\"{\$templateinfo.imagedir}active.png\"{else}src=\"{\$templateinfo.imagedir}inactive.png\"{/if}    alt=\"{\$patrollist[patrol].online}\" /> <a href=\"index.php?page=profile&amp;action=view&amp;user={\$patrollist[patrol].uname}\">{\$patrollist[patrol].uname}</a></td>\r\n    <td class=\"row\">{\$patrollist[patrol].firstname}&nbsp;{\$patrollist[patrol].lastname}</td>\r\n</tr>\r\n{/if}\r\n{/section}\r\n{else}\r\n<tr><td colspan=\"3\" class=\"row\">You are the only member of your group</td></tr>\r\n{/if}\r\n</table>\r\n{if \$nummem > 1}<div align=\"center\">\r\n<input type=\"button\" name=\"pmall\" value=\"PM all users\" onclick=\"window.location=''index.php?page=pmmain&amp;action=typepm&amp;allgroup=true&amp;menuid={\$menuid}''\" class=\"button\" /></div>{/if}\r\n', 31);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (20, 1, '<h1>News Archive</h1>\r\n{if \$numnews > 0}\r\n<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\" class=\"table\">\r\n		{section name=news loop=\$numnews}	\r\n			<tr>\r\n			<td class=\"row\">\r\n                <div align=\"center\"><b>{\$arcnews[news].title}</b></div>\r\n                <div align=\"center\" class=\"smalltext\"><b>{\$arcnews[news].event+\$timeoffset|date_format_pretty}</b></div>\r\n				<div align=\"center\">{\$arcnews[news].news}</div>\r\n			</td>\r\n			</tr>\r\n		{/section}\r\n </table>\r\n{else}\r\n<div>There are no news items</div>\r\n{/if}', 33);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (17, 8, '  <script type=\"text/javascript\">\r\n   {literal}\r\n   function waitforupload()\r\n   {\r\n        if (document.getElementById)\r\n        {\r\n            downloadwindow = document.getElementById(''downloadwindow'');\r\n            waitwindow = document.getElementById(''waitwindow'');\r\n        }\r\n        else if (document.all)\r\n        {\r\n            downloadwindow = document.all[''downloadwindow''];\r\n            waitwindow = document.all[''waitwindow''];\r\n        }\r\n        else if (document.layers)\r\n        {\r\n            downloadwindow = document.layers[''downloadwindow''];\r\n            waitwindow = document.layers[''waitwindow''];\r\n        }\r\n    \r\n        if (downloadwindow && downloadwindow.style)\r\n        {\r\n            waitwindow.style.display = \"\";\r\n            downloadwindow.style.display = \"none\";\r\n\r\n        }\r\n        else if (downloadwindow)\r\n        {\r\n            waitwindow.visibility = \"show\";\r\n            downloadwindow.visibility=\"hide\";\r\n        } \r\n        return true;\r\n   }\r\n   {/literal}\r\n  </script>\r\n  <div id=\"downloadwindow\" style=\"display: '''';\">\r\n  <form action=\"{\$editFormAction}\" method=\"post\" enctype=\"multipart/form-data\"  name=\"form1\" >\r\n    <div align=\"center\">Name of download:<br />\r\n      <input name=\"name\" type=\"text\" id=\"name\" size=\"60\" maxlength=\"50\" value=\"{\$down.name}\" class=\"inputbox\" /> \r\n      <br />\r\n      Description:      <br />\r\n      <textarea name=\"desc\" cols=\"50\" rows=\"5\" id=\"desc\" class=\"inputbox\">{\$down.descs}</textarea>      \r\n      <br />\r\n    Filename{if \$action==\"edit\"}(Leave blank if you don''t want to change the file){/if}:<br />\r\n    <input name=\"file\" type=\"file\" size=\"60\" class=\"inputbox\" />\r\n    <br />\r\n    Category that download must be under:<br />\r\n    <select name=\"cat\" class=\"inputbox\">\r\n        {section name=cats loop=\$numcats}\r\n            <option value=\"{\$cat[cats].id}\"{if \$cat[cats].id == \$down.cat} selected{/if}>{\$cat[cats].name}</option>\r\n        {/section}\r\n    </select> <br /><br />\r\n    <input type=\"submit\" name=\"Submit\" value=\"Submit\" class=\"button\" onclick=\"waitforupload()\" />\r\n    {if \$down.name == \"\"}<input type=\"submit\" name=\"Submit2\" value=\"Cancel\" class=\"button\" onClick=\"window.close();\" />\r\n    {else}\r\n    <input type=\"reset\" name=\"Submit2\" value=\"Cancel\" class=\"button\" onClick=\"history.go(-1);\" />\r\n    {/if}\r\n    </div>\r\n</form>\r\n</div>\r\n<div id=\"waitwindow\" style=\"display: none;\">\r\n    Please wait while uploading, this may take a few minutes depending on the size of the file and your connection....\r\n</div>', 35);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (17, 9, '<form name=\"News\" method=\"post\" action=\"{\$editFormAction}\">\r\n  <table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\" align=\"center\" class=\"table\">\r\n    <tr> \r\n      <th colspan=\"2\" class=\"bighead\"> \r\n        <div align=\"center\">News Item</div>\r\n      </th>\r\n    </tr> \r\n    <tr>\r\n        <td class=\"row\"><div align=\"right\">\r\n            Title:</div>\r\n        </td>\r\n        <td class=\"row\"><div align=\"left\">\r\n         <input type=\"text\" name=\"title\" id=\"title\" size=\"60\" maxlength=\"100\" value=\"{\$shownews.title}\" class=\"inputbox\"/></div>\r\n        </td>\r\n    </tr>\r\n    <tr valign=\"middle\"> \r\n      <td width=\"11%\" class=\"row\" valign=\"top\"><div align=\"right\">News Item:</div></td>\r\n      <td width=\"89%\" class=\"row\"> <div align=\"center\">\r\n      <textarea id=\"story\" name=\"story\" style=\"width: 100%; height: 25em;\">{\$shownews.news}</textarea></div>\r\n	  </td>\r\n    </tr>\r\n    <tr valign=\"middle\"> \r\n      <td colspan=\"2\" class=\"row\"> \r\n        <div align=\"center\"> \r\n        <input type=\"submit\" name=\"submit\" value=\"Submit\" class=\"button\" /> \r\n        {if \$action == \"edit\"}<input type=\"button\" name=\"Submit2\" value=\"Cancel\" onClick=\"window.location=''index.php?page=mythings''\" class=\"button\" />\r\n        {else}\r\n        <input type=\"button\" name=\"Submit2\" value=\"Cancel\" onClick=\"window.close();\" class=\"button\" />\r\n        {/if}\r\n	</div>\r\n      </td>\r\n    </tr>\r\n  </table>\r\n</form>', 64);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (21, 1, '<table width=\"50%\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\" class=\"table\" align=\"center\">\r\n<tr>\r\n<th class=\"bighead\" colspan=\"3\">Patrol Points</th>\r\n</tr>\r\n<tr>\r\n<th class=\"smallhead\" width=\"10%\">Position</th>\r\n<th class=\"smallhead\">Patrol</th>\r\n<th class=\"smallhead\" width=\"10%\">Points</th>\r\n</tr>\r\n{section name=points loop=\$numpoints}\r\n<tr>\r\n<td align=\"right\" class=\"row\">{\$smarty.section.points.iteration}</td>\r\n<td align=\"center\" class=\"row\">{if \$patrolpoints[points].teamname==\$userpatrol}<h3>{\$patrolpoints[points].teamname}</h3>{else}{\$patrolpoints[points].teamname}{/if}</td>\r\n<td align=\"center\" class=\"row\">{\$patrolpoints[points].points}</td>\r\n</tr>\r\n{/section}\r\n</table>', 36);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (22, 1, '{literal}\r\n<script type=\"text/javascript\">\r\n<!--\r\nfunction showhide(id)\r\n{\r\n	var item = null;\r\n    if (document.getElementById)\r\n    {\r\n        item = document.getElementById(id);\r\n    }\r\n    else if (document.all)\r\n    {\r\n        item = document.all[id];\r\n    }\r\n    else if (document.layers)\r\n    {\r\n        item = document.layers[id];\r\n    }\r\n    if(document.form1.is_there_details[0].checked)\r\n    {\r\n        if (item && item.style)\r\n        {\r\n            item.style.display = \"\";\r\n        }\r\n        else if (item)\r\n        {\r\n            item.visibility = \"show\";\r\n        }\r\n    }\r\n    else\r\n    {\r\n        if (item && item.style)\r\n        {\r\n            item.style.display = \"none\";\r\n        }\r\n        else if (item)\r\n        {\r\n            item.visibility = \"hide\";\r\n        }\r\n    }\r\n}\r\n-->\r\n</script>\r\n{/literal}\r\n<h1 class=\"title\" align=\"center\">Add a event</h1>\r\n	<form method=\"post\" name=\"form1\" action=\"{\$editFormAction}\" id=\"form1\">\r\n	<table align=\"center\" width=\"100%\" cellpadding=\"2\" cellspacing=\"0\">\r\n	\r\n		<tr valign=\"baseline\">\r\n		  <td width=\"18%\" align=\"right\" ><div align=\"right\">Summary:</div></td>\r\n		  <td  align=\"left\" width=\"82%\"><input type=\"text\" name=\"summary\" size=\"32\" class=\"inputbox\" /></td>\r\n		</tr>\r\n		<tr valign=\"baseline\">\r\n		  <td  align=\"right\">Starting Date:</td>\r\n		  <td align=\"left\">\r\n<input name=\"sdate\" id=\"sdate\" type=\"text\" size=\"20\" maxlength=\"20\" class=\"inputbox\"  readonly=\"readonly\" /><button id=\"opencal\" name=\"opencal\" class=\"button\">...</button>\r\n            </td>\r\n		</tr>\r\n		<tr valign=\"baseline\">\r\n		  <td  align=\"right\">Ending Date:</td>\r\n		  <td align=\"left\"><input name=\"edate\" id=\"edate\" type=\"text\" size=\"20\" maxlength=\"20\" class=\"inputbox\" readonly=\"readonly\" /><button id=\"opencal2\" name=\"opencal2\" class=\"button\">...</button>\r\n            </td>\r\n		</tr>\r\n        {if \$usergroup != \"New User\" && \$usergroup != \"Admin\"}\r\n		<tr valign=\"baseline\">\r\n		  <td align=\"right\">Private event (Only members of your group will be able to see it)?</td>\r\n		  <td align=\"left\">\r\n		    <input type=\"radio\" name=\"private\" value=\"1\" checked=\"checked\" class=\"inputbox\" />Yes\r\n		    <input type=\"radio\" name=\"private\" value=\"0\" class=\"inputbox\" />No\r\n		   &nbsp; <br />\r\n	      </td>\r\n	  </tr>\r\n      {/if}\r\n		<tr valign=\"baseline\">\r\n		  <td align=\"right\">Do you wish to attach extra information to this event?</td>\r\n		  <td align=\"left\">\r\n		    <input type=\"radio\" name=\"is_there_details\" value=\"1\" checked=\"checked\" class=\"inputbox\" onclick=\"showhide(''moreinfo''); showhide(''moreinfohead'')\" />Yes\r\n		    <input type=\"radio\" name=\"is_there_details\" value=\"0\" class=\"inputbox\" onclick=\"showhide(''moreinfo''); showhide(''moreinfohead'')\" />No\r\n		   &nbsp; <br />\r\n	      </td>\r\n	  </tr>\r\n		<tr valign=\"top\">\r\n		  <td  align=\"right\"><div id=\"moreinfohead\" style=\"display: none;\">Extra Information: </div></td>\r\n		  <td>\r\n                <div id=\"moreinfo\" style=\"display: '''';\"><textarea id=\"story\" name=\"story\" style=\"width: 100%; height: 25em;\"></textarea></div>\r\n        </td>\r\n	  </tr>\r\n		<tr valign=\"top\">\r\n		  <td colspan=\"2\" align=\"center\"><input name=\"Submit\" type=\"submit\" id=\"Submit\" value=\"Submit\" class=\"button\" />&nbsp;<input type=\"button\" name=\"Submit2\" value=\"Cancel\" onClick=\"window.location=''index.php?page=mythings''\" class=\"button\" />\r\n</td>\r\n		</tr>\r\n	  </table>\r\n	</form>\r\n    <script type=\"text/javascript\">\r\n  {literal}\r\n  Calendar.setup(\r\n    {\r\n      inputField  : \"sdate\",         // ID of the input field\r\n      ifFormat    : \"%Y-%m-%d\",    // the date format\r\n      button      : \"opencal\"       // ID of the button\r\n    }\r\n  );\r\n  Calendar.setup(\r\n    {\r\n      inputField  : \"edate\",         // ID of the input field\r\n      ifFormat    : \"%Y-%m-%d\",    // the date format\r\n      button      : \"opencal2\"      // ID of the button\r\n    }\r\n  );\r\n</script>\r\n  {/literal}', 37);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (24, 2, '<a href=\"index.php?page=forums&amp;menuid={\$menuid}\">{\$config.troopname} forums</a>\r\n<table width=\"100%\" cellspacing=\"1\" cellpadding=\"2\" class=\"table\">\r\n <tr>\r\n  <th colspan=\"6\" class=\"bighead\">{\$forum.name} (Page {\$currentpage} of {\$numpages})</th>\r\n </tr>\r\n {if \$numtopics > 0 || \$numannounce > 0 || \$numsticky > 0}\r\n <tr>\r\n   <th class=\"smallhead\">&nbsp;</th>\r\n   <th class=\"smallhead\" width=\"35%\">Subject</th>\r\n   <th class=\"smallhead\" width=\"10%\">Posts</th>\r\n   <th class=\"smallhead\" width=\"10%\">Views</th>\r\n   <th class=\"smallhead\" width=\"20%\">Topic Started</th>\r\n   <th class=\"smallhead\" width=\"20%\">Last Post</th>\r\n </tr>\r\n {if \$numannounce > 0}\r\n <tr>\r\n  <th class=\"smallhead\" colspan=\"6\">Announcements</th>\r\n </tr>\r\n  {section name=topics loop=\$numannounce}\r\n      <tr>\r\n        <td class=\"row\" align=\"center\">{if \$announce[topics].new == 1}<img src=\"{\$templateinfo.imagedir}newpost.gif\" alt=\"New Post\" />{else}<img src=\"{\$templateinfo.imagedir}oldpost.gif\" alt=\"No new posts\" />{/if}</td>\r\n        <td class=\"row\">{if \$userauths.read == 1}<a href=\"index.php?page=forums&amp;action=topic&amp;t={\$announce[topics].id}&amp;menuid={\$menuid}\">{\$announce[topics].subject}</a> {if \$userauths.mod==1}<a href=\"index.php?page=forums&amp;action=modf&amp;a=del&amp;t={\$announce[topics].id}&amp;f={\$forum.id}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}delete.gif\" alt=\"Delete topic\" title=\"Delete topic\" /></a><a href=\"index.php?page=forums&amp;action=modf&amp;a=move&amp;t={\$announce[topics].id}&amp;f={\$forum.id}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}move.png\" alt=\"Move topic\" title=\"Move topic\" /></a>{/if}{else}{\$announce[topics].subject}{/if}\r\n            {if \$announce[topics].desc != \"\"}<br/>\r\n            <span class=\"forum_desc\">{\$announce[topics].desc}</span>{/if}\r\n            {if \$announce[topics].numpages > 1}<br />Page:\r\n            {if \$announce[topics].numpages > 6}\r\n            {section name=pages loop=3}\r\n            <a href=\"index.php?page=forums&amp;action=topic&amp;t={\$announce[topics].id}&amp;menuid={\$menuid}&amp;start={math equation=x*y x=\$config.postcount y=\$smarty.section.pages.index}\">{\$smarty.section.pages.iteration}</a>\r\n            {/section}....\r\n            {section name=pages loop=\$announce[topics].numpages start=\$announce[topics].numpages-3}\r\n            <a href=\"index.php?page=forums&amp;action=topic&amp;t={\$announce[topics].id}&amp;menuid={\$menuid}&amp;start={math equation=x*y x=\$config.postcount y=\$smarty.section.pages.index}\">{\$smarty.section.pages.index+1}</a>\r\n            {/section}             \r\n            {else}\r\n            {section name=pages loop=\$announce[topics].numpages}\r\n            <a href=\"index.php?page=forums&amp;action=topic&amp;t={\$announce[topics].id}&amp;menuid={\$menuid}&amp;start={math equation=x*y x=\$config.postcount y=\$smarty.section.pages.index}\">{\$smarty.section.pages.iteration}</a>\r\n            {/section}\r\n            {/if}{/if}\r\n        </td>\r\n        <td class=\"row\">{\$announce[topics].numposts}</td>\r\n        <td class=\"row\">{\$announce[topics].numviews}</td>\r\n        <td class=\"row\" align=\"center\"><strong>{if \$uname != \"Guest\"}<a href=\"index.php?page=profile&amp;action=view&amp;user={\$announce[topics].userposted}&amp;menuid={\$menuid}\" title=\"View User Profile\">{\$announce[topics].userposted}</a>{else}{\$announce[topics].userposted}{/if}</strong><img {if \$announce[topics].userstatus1 == \"offline\"}src=\"{\$templateinfo.imagedir}offline.png\"{elseif \$announce[topics].userstatus1 == \"online and active\"}src=\"{\$templateinfo.imagedir}active.png\"{else}src=\"{\$templateinfo.imagedir}inactive.png\"{/if} alt=\"{\$announce[topics].userstatus1}\" /><br />\r\n              {\$announce[topics].dateposted+\$timeoffset|date_format_pretty}  </td>\r\n        <td class=\"row\" align=\"center\"><Strong>{if \$uname != \"Guest\"}<a href=\"index.php?page=profile&amp;action=view&amp;user={\$announce[topics].lastpost}\" title=\"View User Profile\">{\$announce[topics].lastpost}</a>{else}{\$announce[topics].lastpost}{/if}</strong><img {if \$announce[topics].userstatus2 == \"offline\"}src=\"{\$templateinfo.imagedir}offline.png\"{elseif \$announce[topics].userstatus2 == \"online and active\"}src=\"{\$templateinfo.imagedir}active.png\"{else}src=\"{\$templateinfo.imagedir}inactive.png\"{/if} alt=\"{\$announce[topics].userstatus2}\" /><br />\r\n              {\$announce[topics].lastdate+\$timeoffset|date_format_pretty}  </td>\r\n      </tr>\r\n  {/section}\r\n <tr>\r\n  <th class=\"smallhead\" colspan=\"6\">Other Posts</th>\r\n </tr> \r\n {/if}\r\n {if \$numsticky > 0}\r\n  {section name=topics loop=\$numsticky}\r\n      <tr>\r\n        <td class=\"row\" align=\"center\">{if \$sticky[topics].new == 1}<img src=\"{\$templateinfo.imagedir}newpost.gif\" alt=\"New Post\" />{else}<img src=\"{\$templateinfo.imagedir}oldpost.gif\" alt=\"No new posts\" />{/if}</td>\r\n        <td class=\"row\">Sticky: {if \$userauths.read == 1}<a href=\"index.php?page=forums&amp;action=topic&amp;t={\$sticky[topics].id}&amp;menuid={\$menuid}\">{\$sticky[topics].subject}</a>{if \$userauths.mod==1}<a href=\"index.php?page=forums&amp;action=modf&amp;a=del&amp;t={\$sticky[topics].id}&amp;f={\$forum.id}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}delete.gif\" alt=\"Delete topic\" title=\"Delete topic\" /></a><a href=\"index.php?page=forums&amp;action=modf&amp;a=move&amp;t={\$sticky[topics].id}&amp;f={\$forum.id}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}move.png\" alt=\"Move topic\" title=\"Move topic\" /></a>{/if}{else}{\$sticky[topics].subject}{/if}\r\n            {if \$sticky[topics].desc != \"\"}<br/>\r\n            <span class=\"forum_desc\">{\$sticky[topics].desc}</span>{/if}\r\n            {if \$sticky[topics].numpages > 1}<br />Page:\r\n            {if \$sticky[topics].numpages > 6}\r\n            {section name=pages loop=3}\r\n            <a href=\"index.php?page=forums&amp;action=topic&amp;t={\$sticky[topics].id}&amp;menuid={\$menuid}&amp;start={math equation=x*y x=\$config.postcount y=\$smarty.section.pages.index}\">{\$smarty.section.pages.iteration}</a>\r\n            {/section}....\r\n            {section name=pages loop=\$sticky[topics].numpages start=\$sticky[topics].numpages-3}\r\n            <a href=\"index.php?page=forums&amp;action=topic&amp;t={\$sticky[topics].id}&amp;menuid={\$menuid}&amp;start={math equation=x*y x=\$config.postcount y=\$smarty.section.pages.index}\">{\$smarty.section.pages.index+1}</a>\r\n            {/section}             \r\n            {else}\r\n            {section name=pages loop=\$sticky[topics].numpages}\r\n            <a href=\"index.php?page=forums&amp;action=topic&amp;t={\$sticky[topics].id}&amp;menuid={\$menuid}&amp;start={math equation=x*y x=\$config.postcount y=\$smarty.section.pages.index}\">{\$smarty.section.pages.iteration}</a>\r\n            {/section}\r\n            {/if}{/if}\r\n        </td>\r\n        <td class=\"row\">{\$sticky[topics].numposts}</td>\r\n        <td class=\"row\">{\$sticky[topics].numviews}</td>\r\n        <td class=\"row\" align=\"center\"><strong>{if \$uname != \"Guest\"}<a href=\"index.php?page=profile&amp;action=view&amp;user={\$sticky[topics].userposted}&amp;menuid={\$menuid}\" title=\"View User Profile\">{\$sticky[topics].userposted}</a>{else}{\$sticky[topics].userposted}{/if}</strong><img {if \$sticky[topics].userstatus1 == \"offline\"}src=\"{\$templateinfo.imagedir}offline.png\"{elseif \$sticky[topics].userstatus1 == \"online and active\"}src=\"{\$templateinfo.imagedir}active.png\"{else}src=\"{\$templateinfo.imagedir}inactive.png\"{/if} alt=\"{\$sticky[topics].userstatus1}\" /><br />\r\n              {\$sticky[topics].dateposted+\$timeoffset|date_format_pretty}  </td>\r\n        <td class=\"row\" align=\"center\"><Strong>{if \$uname != \"Guest\"}<a href=\"index.php?page=profile&amp;action=view&amp;user={\$sticky[topics].lastpost}&amp;menuid={\$menuid}\" title=\"View User Profile\">{\$sticky[topics].lastpost}</a>{else}{\$sticky[topics].lastpost}{/if}</strong><img {if \$sticky[topics].userstatus2 == \"offline\"}src=\"{\$templateinfo.imagedir}offline.png\"{elseif \$sticky[topics].userstatus2 == \"online and active\"}src=\"{\$templateinfo.imagedir}active.png\"{else}src=\"{\$templateinfo.imagedir}inactive.png\"{/if} alt=\"{\$sticky[topics].userstatus2}\" /><br />\r\n              {\$sticky[topics].lastdate+\$timeoffset|date_format_pretty}  </td>\r\n      </tr>\r\n  {/section}\r\n {/if}\r\n  {section name=topics loop=\$limit}\r\n      <tr>\r\n        <td class=\"row\" align=\"center\">{if \$topics[topics].new == 1}<img src=\"{\$templateinfo.imagedir}newpost.gif\" alt=\"New Post\" />{else}<img src=\"{\$templateinfo.imagedir}oldpost.gif\" alt=\"No new posts\" />{/if}</td>\r\n        <td class=\"row\">{if \$userauths.read == 1}<a href=\"index.php?page=forums&amp;action=topic&amp;t={\$topics[topics].id}&amp;menuid={\$menuid}\">{\$topics[topics].subject}</a>{if \$userauths.mod==1}<a href=\"index.php?page=forums&amp;action=modf&amp;a=del&amp;t={\$topics[topics].id}&amp;f={\$forum.id}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}delete.gif\" alt=\"Delete topic\" title=\"Delete topic\" /></a><a href=\"index.php?page=forums&amp;action=modf&amp;a=move&amp;t={\$topics[topics].id}&amp;f={\$forum.id}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}move.png\" alt=\"Move topic\" title=\"Move topic\" /></a>{/if}{else}{\$topics[topics].subject}{/if}\r\n            {if \$topics[topics].desc != \"\"}<br/>\r\n            <span class=\"forum_desc\">{\$topics[topics].desc}</span>{/if}\r\n            {if \$topics[topics].numpages > 1}<br />Page:\r\n            {if \$topics[topics].numpages > 6}\r\n            {section name=pages loop=3}\r\n            <a href=\"index.php?page=forums&amp;action=topic&amp;t={\$topics[topics].id}&amp;menuid={\$menuid}&amp;start={math equation=x*y x=\$config.postcount y=\$smarty.section.pages.index}\">{\$smarty.section.pages.iteration}</a>\r\n            {/section}....\r\n            {section name=pages loop=\$topics[topics].numpages start=\$topics[topics].numpages-3}\r\n            <a href=\"index.php?page=forums&amp;action=topic&amp;t={\$topics[topics].id}&amp;menuid={\$menuid}&amp;start={math equation=x*y x=\$config.postcount y=\$smarty.section.pages.index}\">{\$smarty.section.pages.index+1}</a>\r\n            {/section}             \r\n            {else}\r\n            {section name=pages loop=\$topics[topics].numpages}\r\n            <a href=\"index.php?page=forums&amp;action=topic&amp;t={\$topics[topics].id}&amp;menuid={\$menuid}&amp;start={math equation=x*y x=\$config.postcount y=\$smarty.section.pages.index}\">{\$smarty.section.pages.iteration}</a>\r\n            {/section}\r\n            {/if}{/if}\r\n        </td>\r\n        <td class=\"row\">{\$topics[topics].numposts}</td>\r\n        <td class=\"row\">{\$topics[topics].numviews}</td>\r\n        <td class=\"row\" align=\"center\"><strong>{if \$uname != \"Guest\"}<a href=\"index.php?page=profile&amp;action=view&amp;user={\$topics[topics].userposted}&amp;menuid={\$menuid}\" title=\"View User Profile\">{\$topics[topics].userposted}</a>{else}{\$topics[topics].userposted}{/if}</strong><img {if \$topics[topics].userstatus1 == \"offline\"}src=\"{\$templateinfo.imagedir}offline.png\"{elseif \$topics[topics].userstatus1 == \"online and active\"}src=\"{\$templateinfo.imagedir}active.png\"{else}src=\"{\$templateinfo.imagedir}inactive.png\"{/if} alt=\"{\$topics[topics].userstatus1}\" /><br />\r\n              {\$topics[topics].dateposted+\$timeoffset|date_format_pretty}  </td>\r\n        <td class=\"row\" align=\"center\"><Strong>{if \$uname != \"Guest\"}<a href=\"index.php?page=profile&amp;action=view&amp;user={\$topics[topics].lastpost}&amp;menuid={\$menuid}\" title=\"View User Profile\">{\$topics[topics].lastpost}</a>{else}{\$topics[topics].lastpost}{/if}</strong><img {if \$topics[topics].userstatus2 == \"offline\"}src=\"{\$templateinfo.imagedir}offline.png\"{elseif \$topics[topics].userstatus2 == \"online and active\"}src=\"{\$templateinfo.imagedir}active.png\"{else}src=\"{\$templateinfo.imagedir}inactive.png\"{/if} alt=\"{\$topics[topics].userstatus2}\" /><br />\r\n              {\$topics[topics].lastdate+\$timeoffset|date_format_pretty}  </td>\r\n      </tr>\r\n  {/section}\r\n <tr>\r\n  <td class=\"row\" align=\"right\" colspan=\"6\">\r\n    <div style=\"text-align:center\">\r\n    {if \$prev}\r\n        <a href=\"index.php?page=forums&amp;start={\$prev_start}&amp;f={\$forum.id}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}prev.png\" alt=\"Previous Page\" title=\"Previous Page\" /></a>\r\n    {/if}\r\n    {if \$numpages > 6}\r\n        {if \$currentpage == 1 || \$currentpage == \$numpages}\r\n            {section name=pages loop=3}\r\n                {if \$currentpage != \$smarty.section.pages.iteration}\r\n                    <a href=\"index.php?page=forums&amp;start={\$num_per_page*\$smarty.section.pages.index}&amp;f={\$forum.id}&amp;menuid={\$menuid}\">\r\n                {else}\r\n                    <span class=\"currpage\">\r\n                {/if}{\$smarty.section.pages.iteration}{if \$currentpage != \$smarty.section.pages.iteration}</a>{else}</span>{/if}\r\n            {/section}   \r\n....            \r\n            {section name=pages loop=\$numpages+1 start=\$numpages-2}\r\n                {if \$currentpage != \$smarty.section.pages.index}\r\n                    <a href=\"index.php?page=forums&amp;start={\$num_per_page*\$smarty.section.pages.index-\$num_per_page}&amp;f={\$forum.id}&amp;menuid={\$menuid}\">\r\n                {else}\r\n                    <span class=\"currpage\">\r\n                {/if}{\$smarty.section.pages.index}{if \$currentpage != \$smarty.section.pages.index}</a>{else}</span>{/if}\r\n            {/section}        \r\n        {else}\r\n            <a href=\"index.php?page=forums&amp;start=0&amp;f={\$forum.id}&amp;menuid={\$menuid}\">1<a/>{if \$currentpage != 2 && \$currentpage != 3 && \$currentpage != 4}....{/if}     \r\n            {section name=pages loop=\$currentpage+3 start=\$currentpage-2}\r\n                {if !(\$smarty.section.pages.index <= 1) && !(\$smarty.section.pages.index >= \$numpages)}\r\n                {if \$currentpage != \$smarty.section.pages.index}\r\n                    <a href=\"index.php?page=forums&amp;start={\$num_per_page*\$smarty.section.pages.index-\$num_per_page}&amp;f={\$forum.id}&amp;menuid={\$menuid}\">\r\n                {else}\r\n                    <span class=\"currpage\">\r\n                {/if}{\$smarty.section.pages.index}{if \$currentpage != \$smarty.section.pages.index}</a>{else}</span>{/if}{/if}\r\n            {/section}\r\n            {if \$currentpage != \$numpages-1 && \$currentpage != \$numpages-2 && \$currentpage != \$numpages-3}....{/if}<a href=\"index.php?page=forums&amp;start={\$num_per_page*\$numpages-\$num_per_page}&amp;f={\$forum.id}&amp;menuid={\$menuid}\">{\$numpages}<a/>\r\n        {/if}\r\n    {else}\r\n    {section name=pages loop=\$numpages}\r\n        {if \$currentpage != \$smarty.section.pages.iteration}\r\n            <a href=\"index.php?page=forums&amp;start={\$num_per_page*\$smarty.section.pages.index}&amp;f={\$forum.id}&amp;menuid={\$menuid}\">\r\n        {else}\r\n            <span class=\"currpage\">\r\n        {/if}{\$smarty.section.pages.iteration}{if \$currentpage != \$smarty.section.pages.iteration}</a>{else}</span>{/if}\r\n    {/section}\r\n    {/if}\r\n    {if \$next}\r\n        <a href=\"index.php?page=forums&amp;start={\$next_start}&amp;f={\$forum.id}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}next.png\" alt=\"Next Page\" title=\"Next Page\" /></a>\r\n    {/if}\r\n    </div>\r\n  </td>\r\n  </tr>\r\n<tr>\r\n<td class=\"row\" align=\"center\" colspan=\"6\">\r\n<table width=\"75%\">\r\n<tr>\r\n<td class=\"row\" align=\"center\" valign=\"middle\"><img src=\"{\$templateinfo.imagedir}newpost.gif\" alt=\"New Post\" /></td>\r\n<td class=\"row\" align=\"left\" valign=\"middle\">New post in the topic</td>\r\n<td class=\"row\" width=\"10%\">&nbsp;</td>\r\n<td class=\"row\" align=\"center\" valign=\"middle\"><img src=\"{\$templateinfo.imagedir}oldpost.gif\" alt=\"No new posts\" /></td>\r\n<td class=\"row\" align=\"left\" valign=\"middle\">No new posts</td>\r\n</tr>\r\n</table>\r\n</td>\r\n</tr>\r\n{else}\r\n <tr>\r\n <td colspan=\"2\" class=\"row\" align=\"center\"><strong>No Topics in this forum</strong></td>\r\n{/if}\r\n</table>\r\n{if \$userauths.new==1 || \$userauths.mod==1}<input type=\"button\" value=\"New Topic\" class=\"button\" onclick=\"window.location=''index.php?page=forums&amp;action=new&amp;f={\$forum.id}&amp;menuid={\$menuid}''\" />&nbsp;{/if}', 41);";$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (24, 3, '<a href=\"index.php?page=forums&amp;menuid={\$menuid}\">{\$config.troopname} forums</a> >> <a href=\"index.php?page=forums&amp;f={\$forum.id}&amp;menuid={\$menuid}\">{\$forum.name}</a> >> {\$topic.subject}\r\n<table width=\"100%\" cellspacing=\"1\" cellpadding=\"1\" class=\"table\">\r\n <tr>\r\n  <th class=\"bighead\">{\$topic.subject} (Page {\$currentpage} of {\$numpages})</th>\r\n </tr>\r\n {if \$pollq != \"\" && \$numitems > 0}\r\n <tr>\r\n   <th class=\"smallhead\">Topic Poll</th>\r\n </tr>\r\n <tr>\r\n <td class=\"row\"><b>{\$pollq}</b> {if \$voted != true && \$showresult != true}<form name=\"form1\" action=\"{\$postaction}\" method=\"POST\">{/if}</td>\r\n </tr>\r\n {if \$voted != true && \$showresult != true}\r\n {section name=poll loop=\$numitems}\r\n <tr>\r\n  <td class=\"row\" align=\"left\"><input type=\"radio\" name=\"poll\" value=\"{\$pollitem[poll].id}\" />{\$pollitem[poll].value}</td>\r\n </tr>\r\n {/section}\r\n {else}\r\n  {section name=poll loop=\$numitems}\r\n <tr>\r\n  <td class=\"row\" align=\"left\">{\$pollitem[poll].value}: <img src=\"bar.php?rating={math equation=\"(x / y) * 100\" x=\$pollitem[poll].results y=\$totalvotes format=\"%.2f\"}&amp;width=300&amp;red={\$templateinfo.red}&amp;blue={\$templateinfo.blue}&amp;green={\$templateinfo.green}\" alt=\"{\$pollitem[poll].results}/{\$totalvotes}\" /> {if \$totalvotes > 0}({math equation=\"(x / y) * 100\" x=\$pollitem[poll].results y=\$totalvotes format=\"%.2f\"}%){/if}</td>\r\n </tr>\r\n {/section}\r\n {/if}\r\n {if \$voted != true}\r\n <tr>\r\n <td class=\"row\" align=\"center\">{if \$voted != true && \$showresult != true}<input type=\"submit\" value=\"Vote\" class=\"button\" name=\"vote\" id=\"vote\" />&nbsp;<input type=\"button\" value=\"View Results\" class=\"button\" id=\"view\" onclick=\"window.location=''index.php?page=forums&action=topic&t={\$topic.id}&view=1&menuid={\$menuid}''\" /></form>{elseif \$showresult == true && \$voted != true}<input type=\"button\" value=\"Vote\" class=\"button\" id=\"vote\" onclick=\"window.location=''index.php?page=forums&action=topic&t={\$topic.id}&menuid={\$menuid}''\" />{/if}</td>\r\n </tr>\r\n {elseif \$voted == true && \$usersname!= \"Guest\"}\r\n  <tr>\r\n <td class=\"row\" align=\"center\">Thank you for voting</td>\r\n </tr>\r\n {elseif \$usersname== \"Guest\"}\r\n   <tr>\r\n <td class=\"row\" align=\"center\">You need to login to vote</td>\r\n </tr>\r\n {/if}\r\n{/if}\r\n   <tr>\r\n  <td class=\"row\" align=\"right\" colspan=\"6\">\r\n    <div style=\"text-align:center\">\r\n    Page: {if \$prev}\r\n        <a href=\"index.php?page=forums&amp;action=topic&amp;start={\$prev_start}&amp;t={\$topic.id}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}prev.png\" alt=\"Previous Page\" title=\"Previous Page\" /></a>\r\n    {/if}\r\n    {if \$numpages > 6}\r\n        {if \$currentpage == 1 || \$currentpage == \$numpages}\r\n            {section name=pages loop=3}\r\n                {if \$currentpage != \$smarty.section.pages.iteration}\r\n                    <a href=\"index.php?page=forums&amp;action=topic&amp;start={\$num_per_page*\$smarty.section.pages.index}&amp;t={\$topic.id}&amp;menuid={\$menuid}\">\r\n                {else}\r\n                    <span class=\"currpage\">\r\n                {/if}{\$smarty.section.pages.iteration}{if \$currentpage != \$smarty.section.pages.iteration}</a>{else}</span>{/if}\r\n            {/section}   \r\n....            \r\n            {section name=pages loop=\$numpages+1 start=\$numpages-2}\r\n                {if \$currentpage != \$smarty.section.pages.index}\r\n                    <a href=\"index.php?page=forums&amp;action=topic&amp;start={\$num_per_page*\$smarty.section.pages.index-\$num_per_page}&amp;t={\$topic.id}&amp;menuid={\$menuid}\">\r\n                {else}\r\n                    <span class=\"currpage\">\r\n                {/if}{\$smarty.section.pages.index}{if \$currentpage != \$smarty.section.pages.index}</a>{else}</span>{/if}\r\n            {/section}        \r\n        {else}\r\n            <a href=\"index.php?page=forums&amp;action=topic&amp;start=0&amp;t={\$topic.id}&amp;menuid={\$menuid}\">1<a/>{if \$currentpage != 2 && \$currentpage != 3 && \$currentpage != 4}....{/if}     \r\n            {section name=pages loop=\$currentpage+3 start=\$currentpage-2}\r\n                {if !(\$smarty.section.pages.index <= 1) && !(\$smarty.section.pages.index >= \$numpages)}\r\n                {if \$currentpage != \$smarty.section.pages.index}\r\n                    <a href=\"index.php?page=forums&amp;action=topic&amp;start={\$num_per_page*\$smarty.section.pages.index-\$num_per_page}&amp;t={\$topic.id}&amp;menuid={\$menuid}\">\r\n                {else}\r\n                    <span class=\"currpage\">\r\n                {/if}{\$smarty.section.pages.index}{if \$currentpage != \$smarty.section.pages.index}</a>{else}</span>{/if}{/if}\r\n            {/section}\r\n            {if \$currentpage != \$numpages-1 && \$currentpage != \$numpages-2 && \$currentpage != \$numpages-3}....{/if}<a href=\"index.php?page=forums&amp;action=topic&amp;start={\$num_per_page*\$numpages-\$num_per_page}&amp;t={\$topic.id}&amp;menuid={\$menuid}\">{\$numpages}<a/>\r\n        {/if}\r\n    {else}\r\n    {section name=pages loop=\$numpages}\r\n        {if \$currentpage != \$smarty.section.pages.iteration}\r\n            <a href=\"index.php?page=forums&amp;action=topic&amp;start={\$num_per_page*\$smarty.section.pages.index}&amp;t={\$topic.id}&amp;menuid={\$menuid}\">\r\n        {else}\r\n            <span class=\"currpage\">\r\n        {/if}{\$smarty.section.pages.iteration}{if \$currentpage != \$smarty.section.pages.iteration}</a>{else}</span>{/if}\r\n    {/section}\r\n    {/if}\r\n    {if \$next}\r\n        <a href=\"index.php?page=forums&amp;action=topic&amp;start={\$next_start}&amp;t={\$topic.id}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}next.png\" alt=\"Next Page\" title=\"Next Page\" /></a>\r\n    {/if}\r\n    </div>\r\n  </td>\r\n  </tr>\r\n  {section name=posts loop=\$limit}\r\n      <tr>\r\n        <td class=\"row\">\r\n            <table width=\"100%\" cellspacing=\"1\" cellpadding=\"0\">\r\n             <tr>\r\n             <td rowspan=\"3\" valign=\"top\" align=\"center\" width=\"15%\"><strong>{if \$uname != \"Guest\" && \$posts[posts].publicprofile}<a href=\"index.php?page=profile&amp;action=view&amp;user={\$posts[posts].userposted}&amp;menuid={\$menuid}\" title=\"View User Profile\">{\$posts[posts].userposted}</a>{else}{\$posts[posts].userposted}{/if}</strong><img {if \$posts[posts].userstatus == \"offline\"}src=\"{\$templateinfo.imagedir}offline.png\"{elseif \$posts[posts].userstatus == \"online and active\"}src=\"{\$templateinfo.imagedir}active.png\"{else}src=\"{\$templateinfo.imagedir}inactive.png\"{/if} alt=\"{\$posts[posts].userstatus}\" />{if \$posts[posts].useravy != \"\"}<br /><img src=\"{\$config.avatarpath}/{\$posts[posts].useravy}\" alt=\"Avatar\" border=\"0\" />{/if}{if \$posts[posts].userposted != \"Guest\"}<br />Number of Posts: {\$posts[posts].numposts}<br />Number of Topics: {\$posts[posts].numtopics}<br />{/if}{if \$uname != \"Guest\" && \$posts[posts].userposted != \"Guest\"}<a href=\"index.php?page=pmmain&amp;action=typepm&amp;user={\$posts[posts].userposted}&amp;menuid={\$menuid}\" title=\"Send a PM to {\$posts[posts].userposted}\">Send PM</a>{/if}</td></tr>\r\n             <tr style=\"height:20px\"><th class=\"smallhead\" colspan=\"3\">{if \$posts[posts].subject != \"\"}{\$posts[posts].subject}{else}No Subject{/if} - {\$posts[posts].dateposted+\$timeoffset|date_format_pretty}</th></tr>\r\n             <tr valign=\"top\"><td colspan=\"3\">{\$posts[posts].posttext|bbcode2html}{if \$posts[posts].sig != \"\" || \$posts[posts].edittime != 0}<hr style=\"line\" />{\$posts[posts].sig|bbcode2html}<br />{if \$posts[posts].edittime != 0}<span style=\"font-size:9px;font-style:italic;\">Last Edited: {\$posts[posts].edittime+\$timeoffset|date_format_pretty} by {\$posts[posts].edituser}</span>{/if}{/if}</td></tr>\r\n             <tr style=\"height:20px\"><th colspan=\"3\" class=\"smallhead\"><div align=\"left\">{if (\$userauths.edit == 1 && \$username == \$posts[posts].userposted) || \$userauths.mod == 1}<input type=\"button\" class=\"button\" value=\"Edit Post\" onclick=\"window.location=''index.php?page=forums&amp;action=edit&amp;p={\$posts[posts].id}&amp;t={\$topic.id}&amp;menuid={\$menuid}''\" />{/if}\r\n             {if (\$limit > 1 || \$start != 0) && ((\$userauths.delete == 1 && \$username == \$posts[posts].userposted) || \$userauths.mod == 1)}&nbsp;<input type=\"button\" class=\"button\" value=\"Delete Post\" onclick=\"window.location=''index.php?page=forums&amp;action=delete&amp;p={\$posts[posts].id}&amp;t={\$topic.id}&amp;menuid={\$menuid}''\" />{/if}{if \$userauths.reply}&nbsp;<input type=\"button\" class=\"button\" value=\"Reply with Quote\" onclick=\"window.location=''index.php?page=forums&amp;action=post&amp;p={\$posts[posts].id}&amp;t={\$topic.id}&amp;menuid={\$menuid}''\" />{/if}</div></th></tr>\r\n            </table>\r\n        </td>\r\n      </tr>\r\n  {/section}\r\n   <tr>\r\n  <td class=\"row\" align=\"right\" colspan=\"6\">\r\n    <div style=\"text-align:center\">\r\n    Page: {if \$prev}\r\n        <a href=\"index.php?page=forums&amp;action=topic&amp;start={\$prev_start}&amp;t={\$topic.id}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}prev.png\" alt=\"Previous Page\" title=\"Previous Page\" /></a>\r\n    {/if}\r\n    {if \$numpages > 6}\r\n        {if \$currentpage == 1 || \$currentpage == \$numpages}\r\n            {section name=pages loop=3}\r\n                {if \$currentpage != \$smarty.section.pages.iteration}\r\n                    <a href=\"index.php?page=forums&amp;action=topic&amp;start={\$num_per_page*\$smarty.section.pages.index}&amp;t={\$topic.id}&amp;menuid={\$menuid}\">\r\n                {else}\r\n                    <span class=\"currpage\">\r\n                {/if}{\$smarty.section.pages.iteration}{if \$currentpage != \$smarty.section.pages.iteration}</a>{else}</span>{/if}\r\n            {/section}   \r\n....            \r\n            {section name=pages loop=\$numpages+1 start=\$numpages-2}\r\n                {if \$currentpage != \$smarty.section.pages.index}\r\n                    <a href=\"index.php?page=forums&amp;action=topic&amp;start={\$num_per_page*\$smarty.section.pages.index-\$num_per_page}&amp;t={\$topic.id}&amp;menuid={\$menuid}\">\r\n                {else}\r\n                    <span class=\"currpage\">\r\n                {/if}{\$smarty.section.pages.index}{if \$currentpage != \$smarty.section.pages.index}</a>{else}</span>{/if}\r\n            {/section}        \r\n        {else}\r\n            <a href=\"index.php?page=forums&amp;action=topic&amp;start=0&amp;t={\$topic.id}&amp;menuid={\$menuid}\">1<a/>{if \$currentpage != 2 && \$currentpage != 3 && \$currentpage != 4}....{/if}     \r\n            {section name=pages loop=\$currentpage+3 start=\$currentpage-2}\r\n                {if !(\$smarty.section.pages.index <= 1) && !(\$smarty.section.pages.index >= \$numpages)}\r\n                {if \$currentpage != \$smarty.section.pages.index}\r\n                    <a href=\"index.php?page=forums&amp;action=topic&amp;start={\$num_per_page*\$smarty.section.pages.index-\$num_per_page}&amp;t={\$topic.id}&amp;menuid={\$menuid}\">\r\n                {else}\r\n                    <span class=\"currpage\">\r\n                {/if}{\$smarty.section.pages.index}{if \$currentpage != \$smarty.section.pages.index}</a>{else}</span>{/if}{/if}\r\n            {/section}\r\n            {if \$currentpage != \$numpages-1 && \$currentpage != \$numpages-2 && \$currentpage != \$numpages-3}....{/if}<a href=\"index.php?page=forums&amp;action=topic&amp;start={\$num_per_page*\$numpages-\$num_per_page}&amp;t={\$topic.id}&amp;menuid={\$menuid}\">{\$numpages}<a/>\r\n        {/if}\r\n    {else}\r\n    {section name=pages loop=\$numpages}\r\n        {if \$currentpage != \$smarty.section.pages.iteration}\r\n            <a href=\"index.php?page=forums&amp;action=topic&amp;start={\$num_per_page*\$smarty.section.pages.index}&amp;t={\$topic.id}&amp;menuid={\$menuid}\">\r\n        {else}\r\n            <span class=\"currpage\">\r\n        {/if}{\$smarty.section.pages.iteration}{if \$currentpage != \$smarty.section.pages.iteration}</a>{else}</span>{/if}\r\n    {/section}\r\n    {/if}\r\n    {if \$next}\r\n        <a href=\"index.php?page=forums&amp;action=topic&amp;start={\$next_start}&amp;t={\$topic.id}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}next.png\" alt=\"Next Page\" title=\"Next Page\" /></a>\r\n    {/if}\r\n    </div>\r\n  </td>\r\n  </tr>\r\n</table>\r\n{if \$userauths.reply}<br /><input type=\"button\" class=\"button\" value=\"Reply to topic\"onclick=\"window.location=''index.php?page=forums&amp;action=post&amp;t={\$topic.id}&amp;menuid={\$menuid}''\" /><br />{/if}\r\n', 42);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (17, 10, '<h1 class=\"title\" align=\"center\">Edit Event</h1>\r\n	<form method=\"post\" name=\"form1\" action=\"{\$editFormAction}\">\r\n	<table align=\"center\" width=\"100%\" cellpadding=\"2\" cellspacing=\"0\">\r\n	\r\n		<tr valign=\"baseline\">\r\n		  <td width=\"18%\" align=\"right\" ><div align=\"right\">Summary:</div></td>\r\n		  <td  align=\"left\" width=\"82%\"><input type=\"text\" name=\"summary\" value=\"{\$item.summary}\" size=\"32\" class=\"inputbox\" /></td>\r\n		</tr>\r\n		<tr valign=\"baseline\">\r\n		  <td  align=\"right\">Starting Date:</td>\r\n		  <td align=\"left\"><input name=\"sdate\" id=\"sdate\" type=\"text\" size=\"20\" maxlength=\"20\" value=\"{\$item.startdate}\" class=\"inputbox\"  readonly=\"readonly\" /><button id=\"opencal\" name=\"opencal\" class=\"button\">...</button>\r\n            </td>\r\n		</tr>\r\n		<tr valign=\"baseline\">\r\n		  <td  align=\"right\">Ending Date:</td>\r\n		  <td align=\"left\"><input name=\"edate\" id=\"edate\" type=\"text\" size=\"20\" maxlength=\"20\" value=\"{\$item.enddate}\" class=\"inputbox\"  readonly=\"readonly\" /><button id=\"opencal2\" name=\"opencal2\" class=\"button\">...</button>\r\n            </td>\r\n		</tr>\r\n        {if \$usergroup != \"New User\" && \$usergroup != \"Admin\"}\r\n		<tr valign=\"baseline\">\r\n		  <td align=\"right\">Private event (Only members of your group will be able to see it)?</td>\r\n		  <td align=\"left\">\r\n		    <input type=\"radio\" name=\"private\" value=\"1\" {if \$item.private == \"1\"}checked=\"checked\"{/if} class=\"inputbox\" />Yes\r\n		    <input type=\"radio\" name=\"private\" value=\"0\" {if \$item.private == \"0\"}checked=\"checked\"{/if} class=\"inputbox\" />No\r\n		   &nbsp; <br />\r\n	      </td>\r\n	  </tr>\r\n      {/if}\r\n        		<tr valign=\"baseline\">\r\n		  <td align=\"right\">Do you wish to attach extra information to this event?</td>\r\n		  <td align=\"left\"><p>\r\n		    <label>\r\n		    <input type=\"radio\" name=\"is_there_details\" value=\"1\" {if \$item.detail == \"1\"}checked=\"checked\"{/if} class=\"inputbox\" />\r\n  Yes</label>\r\n		    <label>\r\n		    <input type=\"radio\" name=\"is_there_details\" value=\"0\" {if \$item.detail == \"0\"}checked=\"checked\"{/if} class=\"inputbox\" />\r\n  No</label>\r\n		    <br />\r\n	      </p></td>\r\n	  </tr>\r\n		<tr valign=\"top\">\r\n		  <td  align=\"right\"><div id=\"moreinfohead\" style=\"display: '''';\">Extra Information: </div></td>\r\n		  <td>\r\n                <div id=\"moreinfo\" style=\"display: '''';\"><textarea id=\"story\" name=\"story\" style=\"width: 100%; height: 25em;\">{\$detail}</textarea></div>\r\n        </td>\r\n	  </tr>\r\n		<tr valign=\"top\">\r\n		  <td colspan=\"2\" align=\"center\"><input name=\"Submit\" type=\"submit\" id=\"Submit\" value=\"Update Item\" class=\"button\" /><input type=\"button\" name=\"Submit2\" value=\"Cancel\" onClick=\"window.location=''index.php?page=mythings''\" class=\"button\" /></td>\r\n		</tr>\r\n	  </table>\r\n	</form>\r\n    <script type=\"text/javascript\">\r\n  {literal}\r\n  Calendar.setup(\r\n    {\r\n      inputField  : \"sdate\",         // ID of the input field\r\n      ifFormat    : \"%Y-%m-%d\",    // the date format\r\n      button      : \"opencal\",       // ID of the button\r\n      {/literal}\r\n      date: \"{\$item.startdate}\"\r\n      {literal}\r\n    }\r\n  );\r\n  Calendar.setup(\r\n    {\r\n      inputField  : \"edate\",         // ID of the input field\r\n      ifFormat    : \"%Y-%m-%d\",    // the date format\r\n      button      : \"opencal2\",       // ID of the button\r\n    {/literal}\r\n      date: \"{\$item.enddate}\"\r\n      {literal}\r\n    }\r\n  );\r\n  {/literal}\r\n</script>    \r\n    ', 38);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (24, 1, '{if \$numcats > 0}\r\n<table cellspacing=\"1\" cellpadding=\"2\" border=\"0\" width=\"100%\" class=\"table\">\r\n<tr>\r\n<th class=\"bighead\" colspan=\"5\">{\$config.troopname} Forums</th>\r\n</tr>\r\n{section name=cats loop=\$numcats}\r\n<tr>\r\n<th class=\"smallhead\" colspan=\"5\">\r\n {\$cats[cats].name}\r\n</th>\r\n</tr>\r\n{if \$cats[cats].numforums > 0}\r\n<tr>\r\n<th class=\"smallhead\" width=\"5%\">&nbsp;</th>\r\n<th class=\"smallhead\" width=\"45%\">Forum Name</th>\r\n<th class=\"smallhead\" width=\"10%\">Posts/Topics</th>\r\n<th class=\"smallhead\" width=\"10%\">Views</th>\r\n<th class=\"smallhead\" width=\"30%\">Last Post</th>\r\n</tr>\r\n{section name=floop loop=\$cats[cats].numforums}\r\n{if \$cats[cats].forums[floop].allowed == 1}\r\n<tr>\r\n <td class=\"row\" align=\"center\">{if \$cats[cats].forums[floop].new == 1}<img src=\"{\$templateinfo.imagedir}newpost.gif\" alt=\"New Post\" />{else}<img src=\"{\$templateinfo.imagedir}oldpost.gif\" alt=\"No new posts\" />{/if}</td>\r\n <td class=\"row\" valign=\"top\">{if \$cats[cats].forums[floop].rss == 0 && \$uname != \"Guest\"}<a href=\"index.php?page=rss&amp;action=add&amp;type=1&amp;id={\$cats[cats].forums[floop].id}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}rss_add.png\" alt=\"Add to RSS feed\" title=\"Add to RSS feed\" /></a>&nbsp;{elseif \$cats[cats].forums[floop].rss == 1 && \$uname != \"Guest\"}<a href=\"index.php?page=rss&amp;action=delete&amp;type=1&amp;id={\$cats[cats].forums[floop].id}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}rss_delete.png\" alt=\"Remove from RSS feed\" title=\"Remove from RSS feed\" /></a>&nbsp;{/if}<a href=\"index.php?page=forums&amp;f={\$cats[cats].forums[floop].id}&amp;menuid={\$menuid}\">{\$cats[cats].forums[floop].name}</a><br /><span class=\"desc\">{\$cats[cats].forums[floop].desc}</span></td>\r\n <td class=\"row\" valign=\"top\" align=\"center\">{\$cats[cats].forums[floop].numposts} in {\$cats[cats].forums[floop].numtopics}</td>\r\n <td class=\"row\" valign=\"top\" align=\"center\">{\$cats[cats].forums[floop].numviews}</td>\r\n <td class=\"row\" valign=\"top\">{if \$cats[cats].forums[floop].lasttopic}{if \$cats[cats].forums[floop].read == 1}<a href=\"index.php?page=forums&amp;action=topic&amp;t={\$cats[cats].forums[floop].lasttopic}&amp;late=1&amp;menuid={\$menuid}\">{/if}{\$cats[cats].forums[floop].lastsubject}{if \$cats[cats].forums[floop].read == 1}</a>{/if}<br />\r\n{if \$uname != \"Guest\"} \r\n<a href=\"index.php?page=profile&amp;action=view&amp;user={\$cats[cats].forums[floop].lastpost}&amp;menuid={\$menuid}\" title=\"View User Profile\">{\$cats[cats].forums[floop].lastpost}</a>{else}{\$cats[cats].forums[floop].lastpost}{/if}<img {if \$cats[cats].forums[floop].userstatus == \"offline\"}src=\"{\$templateinfo.imagedir}offline.png\"{elseif \$cats[cats].forums[floop].userstatus == \"online and active\"}src=\"{\$templateinfo.imagedir}active.png\"{else}src=\"{\$templateinfo.imagedir}inactive.png\"{/if} alt=\"{\$cats[cats].forums[floop].userstatus}\" /><br />\r\n {\$cats[cats].forums[floop].lastdate+\$timeoffset|date_format_pretty}{else}No Topics{/if}</td>\r\n</tr>\r\n{else}\r\n<tr>\r\n <td class=\"row\" align=\"center\"></td>\r\n <td class=\"row\" valign=\"top\" colspan=\"4\">{\$cats[cats].forums[floop].name}{if \$cats[cats].forums[floop].desc != \"\"}<br /><span class=\"desc\">{\$cats[cats].forums[floop].desc}</span>{/if}</td>\r\n</tr>\r\n{/if}\r\n{/section}\r\n{else}\r\n<td colspan=\"5\" class=\"row\">\r\n<div align=\"center\"><strong>There are no forums in this category</strong></div>\r\n</td>\r\n{/if}\r\n{/section}\r\n<tr>\r\n<td class=\"row\" align=\"center\" colspan=\"5\">\r\n<table width=\"75%\">\r\n<tr>\r\n<td class=\"row\" align=\"center\" valign=\"middle\"><img src=\"{\$templateinfo.imagedir}newpost.gif\" alt=\"New Post\" /></td>\r\n<td class=\"row\" align=\"left\" valign=\"middle\">New post in the forum</td>\r\n<td class=\"row\" width=\"10%\">&nbsp;</td>\r\n<td class=\"row\" align=\"center\" valign=\"middle\"><img src=\"{\$templateinfo.imagedir}oldpost.gif\" alt=\"No new posts\" /></td>\r\n<td class=\"row\" align=\"left\" valign=\"middle\">No new posts</td>\r\n</tr>\r\n</table>\r\n</td>\r\n</tr>\r\n</table>\r\n{else}\r\n<div align=\"center\"><strong>There are no categories</strong></div>\r\n{/if}', 40);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (24, 4, '<a href=\"index.php?page=forums&amp;menuid={\$menuid}\">{\$config.troopname} forums</a> &gt;&gt; <a href=\"index.php?page=forums&amp;f={\$forum.id}&amp;menuid={\$menuid}\">{\$forum.name}</a>{if !\$new} &gt;&gt; <a href=\"index.php?page=forums&amp;action=topic&amp;t={\$topic.id}&amp;menuid={\$menuid}\">{\$topic.subject}</a>{/if}\r\n<form action=\"{\$postaction}\" method=\"post\" name=\"posttopic\">\r\n<table width=\"100%\" cellspacing=\"1\" cellpadding=\"2\" class=\"table\">\r\n <tr>\r\n  {if !\$new && !\$edit}<th class=\"bighead\" colspan=\"2\">Post a Reply</th>\r\n  {elseif \$new && !\$edit}<th class=\"bighead\" colspan=\"2\">New Topic</th>\r\n  {elseif !\$new && \$edit}<th class=\"bighead\" colspan=\"2\">Edit Post</th>{/if}\r\n </tr>\r\n <tr>\r\n  <td class=\"row\" width=\"20%\">\r\n    <div align=\"right\">Subject:</div>\r\n  </td>\r\n  <td class=\"row\">\r\n    <input type=\"text\" style=\"width:100%\" size=\"255\" class=\"inputbox\" name=\"subject\" id=\"subject\" {if \$post.subject != \"\"}value=\"{\$post.subject}\"{/if} />\r\n  </td>\r\n </tr>\r\n {if (\$new || (\$edit && \$firstpost == 1))}\r\n  <tr>\r\n  <td class=\"row\" width=\"20%\">\r\n     <div align=\"right\">Description:</div>\r\n  </td>\r\n  <td class=\"row\">\r\n    <input type=\"text\" style=\"width:100%\" size=\"255\" class=\"inputbox\" name=\"desc\" id=\"desc\"  {if \$post.desc != \"\"}value=\"{\$post.desc}\"{/if} />\r\n  </td>\r\n </tr>\r\n {/if}\r\n  <tr>\r\n  <td class=\"row\" valign=\"top\">\r\n    <div align=\"right\">Message:<br />You can use <a href=\"javascript:popuphelp(''bbcode'')\">BBCode</a></div>\r\n  </td>\r\n    <td><textarea style=\"width:100%\" rows=\"30\" name=\"story\" id=\"story\" class=\"inputbox\">{if \$post.posttext != \"\"}{\$post.posttext}{/if}</textarea></td>\r\n </tr>\r\n {if !\$edit}\r\n <tr>\r\n <td colspan=\"2\" class=\"row\" align=\"center\">\r\n   Do you want to be informed when the next person posts in this topic? <input type=\"radio\" name=\"next\" id=\"next\" value=\"1\" {if \$watch.notify == 1 || \$watch.notify == 0}checked=\"checked\"{/if}/>Yes&nbsp;<input type=\"radio\" name=\"next\" id=\"next\" value=\"0\" {if \$watch.notify != 1 && \$watch.notify != 0}checked=\"checked\"{/if}/>No<br />\r\n   Do you want to be informed everytime somebody posts in this topic? <input type=\"radio\" name=\"always\" id=\"always\" value=\"1\" {if \$watch.notify == 2}checked=\"checked\"{/if} />Yes&nbsp;<input type=\"radio\" name=\"always\" id=\"always\" value=\"0\" {if \$watch.notify != 2}checked=\"checked\"{/if} />No\r\n </td>\r\n </tr>\r\n {/if}\r\n {if (\$new || (\$edit && \$firstpost == 1)) && (\$userauths.announce == 1 || \$userauths.sticky == 1)}\r\n <tr>\r\n <td colspan=\"2\" class=\"row\" align=\"center\">\r\n   Type of Topic? <input type=\"radio\" name=\"type\" id=\"type\" value=\"0\" {if \$topic.type == 0}checked=\"checked\"{/if}/>Normal{if \$userauths.announce == 1}&nbsp;<input type=\"radio\" name=\"type\" id=\"type\" value=\"1\" {if \$topic.type == 1}checked=\"checked\"{/if}/>Announcement{/if}{if \$userauths.sticky == 1}&nbsp;<input type=\"radio\" name=\"type\" id=\"type\" value=\"2\" {if \$topic.type == 2}checked=\"checked\"{/if}/>Sticky{/if}\r\n </td>\r\n </tr>\r\n {/if}\r\n{if \$new && !\$edit && (\$userauths.poll == 1)}\r\n    <tr valign=\"top\">\r\n        <th colspan=\"2\" class=\"smallhead\">Add Poll</th>\r\n    </tr>\r\n    <tr valign=\"top\">\r\n        <td colspan=\"2\" class=\"row\">Type in a question to add a poll, leave blank if you don''t want to have a poll.</td>\r\n    </tr>\r\n    <tr valign=\"top\">\r\n        <td align=\"right\" class=\"row\">Poll Question: </td> \r\n        <td align=\"left\" class=\"row\"><input type=\"text\" class=\"inputbox\" name=\"pollq\" id=\"pollq\" style=\"width:60%\" size=\"255\" {if \$pollq != \"\"}value=\"{\$pollq}\"{/if}/><input type=\"hidden\" name=\"numopt\" id=\"numopt\" value=\"{\$numopts}\" /></td>\r\n    </tr>\r\n    {section name=options loop=\$numopts+1}\r\n    <tr valign=\"top\">\r\n        <td align=\"right\" class=\"row\">Poll Option: </td>\r\n        <td align=\"left\" class=\"row\"><input type=\"text\" class=\"inputbox\" name=\"poll{\$smarty.section.options.index}\" id=\"poll{\$smarty.section.options.index}\"  style=\"width:60%\" size=\"255\" {if \$pollopts[options] != \"\"}value=\"{\$pollopts[options]}\"{/if}/>{if \$smarty.section.options.index == \$numopts} <input type=\"submit\" class=\"button\" name=\"addpoll\" id=\"addpoll\" value=\"Add Option\" />{/if}</td>\r\n    </tr>\r\n    {/section}\r\n {/if}\r\n <tr>\r\n <td colspan=\"2\" class=\"row\" align=\"center\">\r\n  <span style=\"text-align:center\"><input type=\"submit\" name=\"submit\" value=\"Submit\" class=\"button\" />&nbsp;<input type=\"reset\" name=\"reset\" value=\"Cancel\" class=\"button\" onclick=\"window.location=''{if !\$new}index.php?page=forums&amp;action=topic&amp;t={\$topic.id}&amp;menuid={\$menuid}{else}index.php?page=forums&amp;f={\$forum.id}&amp;menuid={\$menuid}{/if}''\" /></span>\r\n </td>\r\n </tr>\r\n</table>\r\n</form>\r\n{if !\$new && !\$edit}\r\n<br />\r\n<table width=\"100%\" cellspacing=\"1\" cellpadding=\"2\" class=\"table\">\r\n <tr>\r\n  <th class=\"bighead\">Last {\$config.postcount} posts in {\$topic.subject}</th>\r\n </tr>\r\n  {section name=posts loop=\$numposts}\r\n      <tr>\r\n        <td class=\"row\">\r\n            <table width=\"100%\" cellspacing=\"1\" cellpadding=\"1\">\r\n             <tr><td><span style=\"font-weight:bold;\">Username: </span>{\$posts[posts].userposted}<br />\r\n             <span style=\"font-weight:bold;\">Date Posted: </span>{\$posts[posts].dateposted+\$timeoffset|date_format_pretty}\r\n             </td></tr>\r\n             <tr><td colspan=\"2\">{\$posts[posts].posttext|bbcode2html}</td></tr>\r\n            </table>\r\n        </td>\r\n      </tr>\r\n  {/section}\r\n</table>\r\n{/if}', 43);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (23, 1, '<h1>{\$newsitem.title}</h1>\r\n<h2 align=\"center\">{\$newsitem.event+\$timeoffset|date_format_pretty}</h2>\r\n<br/>\r\n<div align=\"center\">\r\n{\$newsitem.news}</div>', 39);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (24, 6, '{if \$act==\"move\"}\r\n<div align=\"center\">Where do you want to move the topic to?<br />\r\n <form method=\"post\" action=\"{\$editFormAction}\" name=\"form\">\r\n <select name=\"forum\" class=\"inputbox\">\r\n  {section name=loop loop=\$numforums}\r\n   {if \$forums[loop].id != \$forum.id}<option value=\"{\$forums[loop].id}\">{\$forums[loop].name}</option>{/if}\r\n  {/section}\r\n </select><br />\r\n <input type=\"Submit\" name=\"submit\" id=\"submit\" value=\"Move Topic\" class=\"button\" />&nbsp;<input type=\"button\" value=\"Cancel\" id=\"cancel\" name=\"cancel\" onclick=\"window.location = ''index.php?page=forums&f={\$forum.id}&amp;menuid={\$menuid}''\" class=\"button\" />\r\n </form></div>\r\n{elseif \$act==\"del\"}\r\n<div align=\"center\">Are you sure you want to delete this topic?<br />\r\n <form method=\"post\" action=\"{\$editFormAction}\" name=\"form\">\r\n <input type=\"Submit\" name=\"submit\" id=\"submit\" value=\"Yes\" class=\"button\" />&nbsp;<input type=\"button\" value=\"No\" id=\"cancel\" name=\"cancel\" onclick=\"window.location = ''index.php?page=forums&f={\$forum.id}&amp;menuid={\$menuid}''\" class=\"button\" />\r\n </form></div>\r\n{/if}', 45);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (24, 7, '<div align=\"center\">Are you sure you want to delete this post?<br />\r\n <form method=\"POST\" action=\"{\$editFormAction}\" name=\"form\">\r\n <input type=\"Submit\" name=\"submit\" id=\"submit\" value=\"Yes\" class=\"button\" />&nbsp;<input type=\"button\" value=\"No\" id=\"cancel\" name=\"cancel\" onclick=\"window.location = ''index.php?page=forums&action=topic&t={\$tid}&amp;menuid={\$menuid}''\" class=\"button\" />\r\n </form></div>', 46);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (25, 1, '{literal}\r\n<script type=\"text/javascript\">\r\n<!--\r\nfunction deletepm() {\r\nif (confirm(\"This will delete the personal messages. Continue?\"))\r\n return true;\r\nelse\r\n    return false;\r\n}\r\n//-->\r\n</script>\r\n{/literal}\r\n<table cellspacing=\"0\" cellpadding=\"2\" border=\"0\" width=\"100%\">\r\n<tr>\r\n<th colspan=\"2\" class=\"bighead\">{\$onpage}</th>\r\n</tr>\r\n<tr>\r\n<td align=\"center\" width=\"15%\"><input type=\"button\" class=\"button\" value=\"Inbox\" onclick=\"window.location=''index.php?page=pmmain&amp;menuid={\$menuid}''\" />&nbsp;<input type=\"button\" class=\"button\" value=\"Sentbox\" onclick=\"window.location=''index.php?page=pmmain&amp;action=sentbox&amp;menuid={\$menuid}''\" />&nbsp;<input type=\"button\" class=\"button\" value=\"Savebox\" onclick=\"window.location=''index.php?page=pmmain&amp;action=savebox&amp;menuid={\$menuid}''\" />&nbsp;<input type=\"button\" class=\"button\" value=\"Drafts\" onclick=\"window.location=''index.php?page=pmmain&amp;action=drafts&amp;menuid={\$menuid}''\" />&nbsp;<input type=\"button\" class=\"button\" value=\"New PM\" onclick=\"window.location=''index.php?page=pmmain&amp;action=typepm&amp;menuid={\$menuid}''\" /></td>\r\n</tr>\r\n<tr>\r\n<td align=\"center\" valign=\"top\">\r\n{if \$numpm > 0}\r\n<form name=\"form1\" action=\"{\$pageaction}\" method=\"post\" onsubmit=\"return deletepm();\">\r\n    <table cellspacing=\"1\" cellpadding=\"2\" class=\"table\" width=\"100%\">\r\n     <tr>\r\n     <th class=\"smallhead\" width=\"2%\"></th>\r\n     <th class=\"smallhead\">Subject</th>\r\n     <th class=\"smallhead\" width=\"20%\">{if \$onpage != \"Drafts\" && \$onpage != \"Sentbox\"}From{else}To{/if}</th>\r\n     <th class=\"smallhead\" width=\"20%\">{if \$onpage != \"Drafts\"}Date Sent{else}Date Saved{/if}</th>\r\n     <th class=\"smallhead\" width=\"6%\">Action</th>\r\n     <th class=\"smallhead\" width=\"6%\">Select</th>\r\n     </tr>\r\n     {section name=pmloop loop=\$numpm}\r\n     <tr>\r\n     <td {if \$pm[pmloop].readpm == 0 && \$onpage != \"Drafts\"}class=\"newrow\"{else}class=\"row\"{/if} align=\"center\">{if \$pm[pmloop].readpm == 0 && \$onpage != \"Drafts\"}<img src=\"{\$templateinfo.imagedir}newpm.gif\" alt=\"New\" border=\"0\" />{else}<img src=\"{\$templateinfo.imagedir}oldpm.gif\" alt=\"Read\" border=\"0\" />{/if}</td>\r\n      <td {if \$pm[pmloop].readpm == 0 && \$onpage != \"Drafts\"}class=\"newrow\"{else}class=\"row\"{/if}><a href=\"index.php?page=pmmain&amp;action=readpm&amp;id={\$pm[pmloop].id}&amp;menuid={\$menuid}\" title=\"{\$pm[pmloop].text|strip_tags|truncate}\">{\$pm[pmloop].subject}</a></td>\r\n      <td {if \$pm[pmloop].readpm == 0 && \$onpage != \"Drafts\"}class=\"newrow\"{else}class=\"row\"{/if}>{if \$onpage != \"Drafts\" && \$onpage != \"Sentbox\"}<a href=\"index.php?page=profile&amp;action=view&amp;user={\$pm[pmloop].fromuser}&amp;menuid={\$menuid}\" title=\"View User Profile\">{\$pm[pmloop].fromuser}</a><img {if \$pm[pmloop].userstatus == \"offline\"}src=\"{\$templateinfo.imagedir}offline.png\"{elseif \$pm[pmloop].userstatus == \"online and active\"}src=\"{\$templateinfo.imagedir}active.png\"{else}src=\"{\$templateinfo.imagedir}inactive.png\"{/if} alt=\"{\$pm[pmloop].userstatus}\" />{else}{section name=users loop=\$pm[pmloop].touser.number}<a href=\"index.php?page=profile&amp;action=view&amp;user={\$pm[pmloop].touser.users[users].uname}&amp;menuid={\$menuid}\" title=\"View User Profile\">{\$pm[pmloop].touser.users[users].uname}</a><img {if \$pm[pmloop].touser.users[users].status == \"offline\"}src=\"{\$templateinfo.imagedir}offline.png\"{elseif \$pm[pmloop].touser.users[users].status == \"online and active\"}src=\"{\$templateinfo.imagedir}active.png\"{else}src=\"{\$templateinfo.imagedir}inactive.png\"{/if} alt=\"{\$pm[pmloop].touser.users[users].status}\" />{if \$smarty.section.users.iteration != \$pm[pmloop].touser.number}, {/if}{/section}{/if}</td>\r\n      <td {if \$pm[pmloop].readpm == 0 && \$onpage != \"Drafts\"}class=\"newrow\"{else}class=\"row\"{/if} align=\"center\">{\$pm[pmloop].date+\$timeoffset|date_format_pretty}</td>\r\n      <td {if \$pm[pmloop].readpm == 0 && \$onpage != \"Drafts\"}class=\"newrow\"{else}class=\"row\"{/if} align=\"center\">\r\n      {if \$onpage == \"Inbox\"}<input type=\"button\" class=\"button\" value=\"Move to Savebox\" onclick=\"window.location=''index.php?page=pmmain&amp;action=save&amp;id={\$pm[pmloop].id}&amp;menuid={\$menuid}''\" />{/if}{if \$onpage == \"Drafts\"}<input type=\"button\" class=\"button\" value=\"Send PM\" onclick=\"window.location=''index.php?page=pmmain&amp;action=send&amp;id={\$pm[pmloop].id}&amp;menuid={\$menuid}''\" /><br /><input type=\"button\" class=\"button\" value=\"Edit PM\" onclick=\"window.location=''index.php?page=pmmain&amp;action=edit&amp;id={\$pm[pmloop].id}&amp;menuid={\$menuid}''\" />{/if}</td>\r\n      <td {if \$pm[pmloop].readpm == 0 && \$onpage != \"Drafts\"}class=\"newrow\"{else}class=\"row\"{/if} align=\"center\"><input type=\"checkbox\" name=\"pm_{\$pm[pmloop].id}\" id=\"pm_{\$pm[pmloop].subject}\" value=\"1\" /></td>\r\n     </tr>\r\n     {/section}\r\n     <tr>\r\n     <td colspan=\"6\" class=\"row\" align=\"right\"><input type=\"submit\" class=\"button\" value=\"Delete Selected Messages\" name=\"delete\" id=\"delete\" /><br /><input type=\"submit\" class=\"button\" value=\"Delete All Messages\" name=\"deleteall\" id=\"deleteall\" /></td>\r\n     </tr>\r\n     <tr>\r\n     <td colspan=\"6\" class=\"row\" align=\"left\">\r\n     {\$onpage} usage:<br />\r\n        <img src=\"bar.php?rating={math equation=((x/y)*100) x=\$numpm y=\$config.numpm}&amp;width=320&amp;height=20&amp;red={\$templateinfo.red}&amp;blue={\$templateinfo.blue}&amp;green={\$templateinfo.green}\" alt=\"You currently using {\$numpm} of your {\$config.numpm} allowed messages\" /><br />\r\n        You are currently have {\$numpm} messages in your {\$onpage}. You are allowed a maximum of {\$config.numpm} messages per box.\r\n    </td>\r\n     </tr>     \r\n    </table>\r\n    <input type=\"hidden\" name=\"oldpage\" id=\"oldpage\" value=\"{\$onpage}\" />\r\n    </form>\r\n{else}\r\nThe are no messages in the {\$onpage} folder\r\n{/if}\r\n</td>\r\n</tr>\r\n</table>', 48);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (25, 2, '{literal}\r\n<script type=\"text/javascript\">\r\n<!--\r\nfunction deletepm(articleId, page) {\r\nif (confirm(\"This will delete the personal message. Continue?\")){/literal}\r\ndocument.location = \"index.php?page=pmmain&action=delete&id=\" + articleId + \"&menuid={\$menuid}\";{literal}\r\n}\r\n//-->\r\n</script>\r\n{/literal}\r\n<table cellspacing=\"0\" cellpadding=\"2\" border=\"0\" width=\"100%\">\r\n<tr>\r\n<th colspan=\"2\" class=\"bighead\">{\$pm.subject}</th>\r\n</tr>\r\n<tr>\r\n<td align=\"center\" width=\"15%\"><input type=\"button\" class=\"button\" value=\"Inbox\" onclick=\"window.location=''index.php?page=pmmain&amp;menuid={\$menuid}''\" />&nbsp;<input type=\"button\" class=\"button\" value=\"Sentbox\" onclick=\"window.location=''index.php?page=pmmain&amp;action=sentbox&amp;menuid={\$menuid}''\" />&nbsp;<input type=\"button\" class=\"button\" value=\"Savebox\" onclick=\"window.location=''index.php?page=pmmain&amp;action=savebox&amp;menuid={\$menuid}''\" />&nbsp;<input type=\"button\" class=\"button\" value=\"Drafts\" onclick=\"window.location=''index.php?page=pmmain&amp;action=drafts&amp;menuid={\$menuid}''\" />&nbsp;<input type=\"button\" class=\"button\" value=\"New PM\" onclick=\"window.location=''index.php?page=pmmain&amp;action=typepm&amp;menuid={\$menuid}''\" /></td>\r\n</tr>\r\n<tr>\r\n<td align=\"center\" valign=\"top\">\r\n    <table cellspacing=\"1\" cellpadding=\"2\" width=\"100%\">\r\n     <tr>\r\n     <td align=\"left\"><span style=\"font-weight:bold\">{if !\$drafts && !\$sentbox}From:</span> <a href=\"index.php?page=profile&amp;action=view&amp;user={\$pm.fromuser}&amp;menuid={\$menuid}\" alt=\"View User Profile\">{\$pm.fromuser}</a>{else}To:</span> <a href=\"index.php?page=profile&amp;action=view&amp;user={\$pm.touser}&amp;menuid={\$menuid}\" alt=\"View User Profile\">{\$pm.touser}<a/>{/if}</td>\r\n     </tr>\r\n     <tr>\r\n     <td align=\"left\"><span style=\"font-weight:bold\">{if !\$drafts}Date Sent:{else}Date Saved: {/if}</span> {\$pm.date+\$timeoffset|date_format_pretty}</td>\r\n     </tr>\r\n     <tr>\r\n     <td>\r\n     {if \$pm.type != 4 && \$pm.type != 2}\r\n        <input type=\"button\" class=\"button\" value=\"Reply to message\" name=\"reply\" id=\"reply\" onclick=\"window.location=''index.php?page=pmmain&amp;action=reply&amp;id={\$pm.id}&amp;menuid={\$menuid}'';\" /> &nbsp;\r\n     {/if}\r\n     {if \$pm.type == 4}\r\n        <input type=\"button\" class=\"button\" value=\"Send message\" name=\"send\" id=\"send\" onclick=\"window.location=''index.php?page=pmmain&amp;action=send&amp;id={\$pm.id}&amp;menuid={\$menuid}'';\" /> &nbsp;\r\n        <input type=\"button\" class=\"button\" value=\"Edit message\" name=\"edit\" id=\"edit\" onclick=\"window.location=''index.php?page=pmmain&amp;action=edit&amp;id={\$pm.id}&amp;menuid={\$menuid}'';\" /> &nbsp;\r\n     {/if}\r\n     <input type=\"button\" class=\"button\" value=\"Delete message\" name=\"delete\" id=\"delete\" onclick=\"deletepm({\$pm.id});\" /> &nbsp;\r\n     </td>\r\n     </tr>\r\n     <tr>\r\n     <th class=\"smallhead\">Message</th>\r\n  </tr>\r\n     <tr>\r\n     <td>{\$pm.text|bbcode2html}</td>\r\n     </tr>\r\n    </table>\r\n</td>\r\n</tr>\r\n</table>', 49);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (26, 1, '<form name=\"relogons\" method=\"post\" action=\"{\$action}\">\r\n<table width=\"100%\" cellspacing=\"1\" cellpadding=\"2\">\r\n<tr>\r\n<th class=\"smallhead\" colspan=\"2\">You are required to logon to access this page</th>\r\n</tr>\r\n        <tr>\r\n        <td class=\"row\" width=\"50%\">\r\n            <div align=\"right\">Username:</div>\r\n        </td>\r\n        <td class=\"row\">\r\n            <div align=\"left\"><input type=\"text\" name=\"username2\" id=\"username2\" size=\"50\" maxlength=\"50\" class=\"inputbox\" /></div>\r\n        </td>\r\n        </tr>\r\n        <tr>\r\n        <td class=\"row\">\r\n			<div align=\"right\">Password</div>\r\n        </td>\r\n        <td class=\"row\">\r\n            <div align=\"left\"><input type=\"password\" name=\"password2\" id=\"password2\" size=\"50\" maxlength=\"50\" class=\"inputbox\" /></div>\r\n		</td>\r\n        </tr>\r\n        <tr>\r\n        <td class=\"row\" colspan=\"2\" align=\"center\">\r\n				<input type=\"submit\" name=\"relogon\" id=\"relogon\" value=\"Login\" class=\"button\" />\r\n        </td>\r\n        </tr>\r\n                <tr>\r\n        <td class=\"row\" colspan=\"2\" align=\"center\">\r\n            <a href=\"index.php?page=forgot\" style=\"font-size:9pt\">I forgot my username and password!</a><br />\r\n        </td>\r\n        </tr>\r\n        {if \$config.register == 1}<tr>\r\n        <td class=\"row\" colspan=\"2\" align=\"center\">\r\n<a href=\"index.php?page=register\" style=\"font-size:9pt\">I''d like to register.</a>\r\n        </td>\r\n        </tr>{/if}\r\n</table>\r\n</form>', 50);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (25, 3, '<table cellspacing=\"0\" cellpadding=\"2\" border=\"0\" width=\"100%\">\r\n<tr>\r\n<th colspan=\"2\" class=\"bighead\">{if !\$editmode}New{else}Edit{/if} Personal Message</th>\r\n</tr>\r\n<tr>\r\n<td align=\"center\" width=\"15%\"><input type=\"button\" class=\"button\" value=\"Inbox\" onclick=\"window.location=''index.php?page=pmmain&amp;menuid={\$menuid}''\" />&nbsp;<input type=\"button\" class=\"button\" value=\"Sentbox\" onclick=\"window.location=''index.php?page=pmmain&amp;action=sentbox&amp;menuid={\$menuid}''\" />&nbsp;<input type=\"button\" class=\"button\" value=\"Savebox\" onclick=\"window.location=''index.php?page=pmmain&amp;action=savebox&amp;menuid={\$menuid}''\" />&nbsp;<input type=\"button\" class=\"button\" value=\"Drafts\" onclick=\"window.location=''index.php?page=pmmain&amp;action=drafts&amp;menuid={\$menuid}''\" />&nbsp;<input type=\"button\" class=\"button\" value=\"New PM\" onclick=\"window.location=''index.php?page=pmmain&amp;action=typepm&amp;menuid={\$menuid}''\" /></td>\r\n</tr>\r\n<tr>\r\n<td align=\"center\" valign=\"top\">\r\n<form action=\"{\$postaction}\" method=\"post\" name=\"posttopic\">    \r\n    <table cellspacing=\"1\" cellpadding=\"2\" width=\"100%\">\r\n     <tr>\r\n     <td align=\"left\">To: <input type=\"text\" size=\"50\" class=\"inputbox\" name=\"touser\" id=\"touser\" value=\"{\$editpm.touser}\" /></td>\r\n     </tr>\r\n     <tr>\r\n     <td align=\"left\">Subject: <input type=\"text\" size=\"50\" class=\"inputbox\" name=\"subject\" id=\"subject\" value=\"{\$editpm.subject}\" /></td>\r\n     </tr>\r\n     <tr>\r\n     <th class=\"smallhead\">Message</th>\r\n     <tr>\r\n     <td><textarea style=\"width:100%\" rows=\"30\" name=\"story\" id=\"story\" class=\"inputbox\">{\$editpm.text}</textarea><br />You can use <a href=\"javascript:popuphelp(''bbcode'')\">BBCode</a></td>\r\n     </tr>\r\n      <tr>\r\n    <td colspan=\"2\" class=\"row\" align=\"center\">\r\n  <span style=\"text-align:center\"><input type=\"submit\" name=\"submit\" value=\"Send PM\" class=\"button\" />&nbsp;<input type=\"submit\" name=\"submit\" value=\"Save PM\" class=\"button\" />&nbsp;<input type=\"reset\" name=\"reset\" value=\"Cancel\" class=\"button\" onclick=\"history.go(-1);\" /></span>\r\n </td>\r\n </tr>\r\n</table>\r\n </form>\r\n</td>\r\n</tr>\r\n</table>', 51);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (27, 1, '{if \$numadva > 0 }\r\n    <a name=\"top\"></a><h1>{\$schemeinfo.name}</h1>\r\n    <div align=\"left\">\r\n    {section name=num loop=\$numadva}\r\n     - <a href=\"#{\$advan[num].advancement|replace:'' '':''''}\">{\$advan[num].advancement}</a><br />\r\n    {/section}\r\n    </div>\r\n    <table width=\"100%\"  border=\"0\" cellspacing=\"1\" cellpadding=\"4\" class=\"table\">\r\n        {section name=num loop=\$numadva}\r\n          {if \$advan[num].numitems > 0}\r\n          <tr><th colspan=\"2\" class=\"bighead\"><a id=\"{\$advan[num].advancement|replace:'' '':''''}\" name=\"{\$advan[num].advancement|replace:'' '':''''}\"></a>{\$advan[num].advancement}</th></tr>\r\n          <tr>\r\n            <th width=\"83%\" scope=\"col\"  class=\"smallhead\">Requirement</th>\r\n          </tr>\r\n          {section name=numreq loop=\$advan[num].numitems}\r\n              <tr valign=\"top\" align=\"center\">\r\n                <td class=\"row\"><strong>{\$advan[num].items[numreq].item}</strong><br />\r\n                <span class=\"comment\">{\$advan[num].items[numreq].description}</span></td>\r\n              </tr>\r\n          {/section}\r\n          <tr>\r\n          <td colspan=\"2\" class=\"row\">\r\n            <a href=\"#top\">Back to top</a>\r\n          </td>\r\n          </tr>\r\n          {/if}\r\n         {/section}\r\n          <tr>\r\n          <td colspan=\"2\" class=\"row\">\r\n            <a href=\"index.php?page=advancements\">Back to award schemes</a>\r\n          </td>\r\n          </tr>\r\n    </table>\r\n{else}\r\n<h1>Award Schemes</h1>\r\n<div align=\"center\">\r\n<ul>\r\n{section name=scheme loop=\$numschemes}\r\n<li><a href=\"index.php?page=advancements&amp;scheme={\$schemes[scheme].id}\">{\$schemes[scheme].name} Award Scheme</a></li>\r\n {/section}\r\n </ul></div>\r\n{/if}', 52);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (28, 1, '{if \$numcats > 0}\r\n	<h1>Links</h1>\r\n<table width=\"100%\" border=\"0\" cellpadding=\"4\" cellspacing=\"1\" class=\"table\">\r\n	  {section name=catloop loop=\$numcats}\r\n      <tr> \r\n	  <th class=\"bighead\">{\$links[catloop].name}</th>\r\n	</tr>\r\n	 {section name=linkloop loop=\$links[catloop].numlinks}\r\n		 <tr>\r\n			<td class=\"row\" align=\"center\">\r\n                <a href=\"http://{\$links[catloop].links[linkloop].url}\">{\$links[catloop].links[linkloop].name}</a><br />\r\n                <span class=\"comment\">{\$links[catloop].links[linkloop].desc}</span>\r\n            </td>\r\n	  </tr>\r\n	  {/section}\r\n      {/section}\r\n	</table>\r\n{else}\r\nThere are no links in the database\r\n{/if}', 54);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (4, 2, '{if \$info.publicprofile == 1}\r\n<table width=\"70%\" align=\"center\" border=\"0\" cellpadding=\"4\" cellspacing=\"1\" class=\"table\">\r\n<tr>\r\n<th colspan=\"2\" class=\"bighead\">Profile for {\$info.uname}</th>\r\n</tr>\r\n  <tr valign=\"top\">\r\n    <td align=\"center\" class=\"row\" colspan=\"2\">{\$info.uname} is currently {\$info.online}</td>\r\n  </tr> \r\n  <tr>\r\n    <td width=\"50%\" align=\"right\" class=\"row\">Current Page: </td>\r\n    <td class=\"row\">{\$info.location}</td>\r\n  </tr>\r\n    {if \$info.avyfile != \"\"}\r\n  <tr valign=\"top\">\r\n    <td width=\"50%\" align=\"right\" class=\"row\">Avatar: </td>\r\n    <td class=\"row\"><img src=\"{\$config.avatarpath}/{\$info.avyfile}\" alt=\"Avatar\" /></td>\r\n  </tr>\r\n  {/if}\r\n  {if \$info.sig != \"\"}\r\n  <tr valign=\"top\">\r\n    <td width=\"50%\" align=\"right\" class=\"row\">Signature: </td>\r\n    <td class=\"row\">{\$info.sig|bbcode2html}</td>\r\n  </tr>\r\n  {/if}\r\n  <tr>\r\n    <td width=\"50%\" align=\"right\" class=\"row\">Date Joined: </td>\r\n    <td class=\"row\">{\$info.joined|date_format_pretty}</td>\r\n  </tr>\r\n  <tr>\r\n    <td width=\"50%\" align=\"right\" class=\"row\">Group: </td>\r\n    <td class=\"row\">{\$info.group}</td>\r\n  </tr>\r\n  {if \$info.showname == 1}\r\n  <tr>\r\n    <td width=\"50%\" align=\"right\" class=\"row\">Real Name: </td>\r\n    <td class=\"row\">{\$info.firstname} {\$info.lastname}</td>\r\n  </tr>\r\n  {/if}\r\n    {if \$info.showdob == 1}\r\n  <tr>\r\n    <td width=\"50%\" align=\"right\" class=\"row\">Date Of Birth: </td>\r\n    <td class=\"row\">{\$info.dob}</td>\r\n  </tr>\r\n  {/if}\r\n    {if \$info.showemail == 1}\r\n  <tr>\r\n    <td width=\"50%\" align=\"right\" class=\"row\">Email Address: </td>\r\n    <td class=\"row\">{mailto address=\$info.email encode=hex}</td>\r\n  </tr>\r\n  {/if}\r\n{if \$info.showrecord == 1 && \$info.troopuser == 1}\r\n  <tr>\r\n    <td align=\"center\" class=\"row\" colspan=\"2\"><input type=\"button\" class=\"button\" value=\"View Scout Record\" onclick=\"window.location=''index.php?page=record&amp;user={\$info.uname}''\" /></td>\r\n  </tr>\r\n  {/if}\r\n    <tr>\r\n    <td align=\"center\" class=\"row\" colspan=\"2\">{if \$info.uname != \$usersname}<input type=\"button\" class=\"button\" value=\"Send user a PM\" onclick=\"window.location=''index.php?page=pmmain&amp;action=typepm&amp;user={\$info.uname}''\" />{else}<input type=\"button\" class=\"button\" value=\"Edit your profile\" onclick=\"window.location=''index.php?page=profile''\" />{/if}</td>\r\n  </tr>\r\n<tr>\r\n<th colspan=\"2\" class=\"bighead\">User Stats</th>\r\n</tr>\r\n  <tr>\r\n    <td width=\"50%\" align=\"right\" class=\"row\">Number of forum posts: </td>\r\n    <td class=\"row\">{\$info.numposts} ({math equation=\"(x/((y-z)/86400))\" x=\$info.numposts y=\$timenow z=\$info.joined format=\"%.2f\"} posts per day)</td>\r\n  </tr>\r\n  <tr>\r\n    <td width=\"50%\" align=\"right\" class=\"row\">Number of new topics started: </td>\r\n    <td class=\"row\">{\$info.numtopics}</td>\r\n  </tr>\r\n  <tr>\r\n    <td width=\"50%\" align=\"right\" class=\"row\">Number of albums added: </td>\r\n    <td class=\"row\">{\$info.numalbums}</td>\r\n  </tr>\r\n  <tr>\r\n    <td width=\"50%\" align=\"right\" class=\"row\">Number of photos uploaded: </td>\r\n    <td class=\"row\">{\$info.numphotos}</td>\r\n  </tr>\r\n  <tr>\r\n    <td width=\"50%\" align=\"right\" class=\"row\">Number of articles added: </td>\r\n    <td class=\"row\">{\$info.numarticles}</td>\r\n  </tr>\r\n  <tr>\r\n    <td width=\"50%\" align=\"right\" class=\"row\">Number of downloads added: </td>\r\n    <td class=\"row\">{\$info.numdown}</td>\r\n  </tr>\r\n  <tr>\r\n    <td width=\"50%\" align=\"right\" class=\"row\">Number of news items added: </td>\r\n    <td class=\"row\">{\$info.numnews}</td>\r\n  </tr>\r\n  <tr>\r\n    <td width=\"50%\" align=\"right\" class=\"row\">Number of calender events added: </td>\r\n    <td class=\"row\">{\$info.numevent}</td>\r\n  </tr>\r\n</table>\r\n{else}\r\nThis user has disabled their public profile\r\n{/if}', 55);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (29, 1, ' <form action=\"{\$postaction}\" method=\"post\" name=\"posttopic\">\r\n<table width=\"100%\" cellspacing=\"1\" cellpadding=\"2\" class=\"table\">\r\n<tr valign=\"top\">\r\n        <th colspan=\"2\" class=\"smallhead\">Add Poll</th>\r\n    </tr>\r\n    <tr valign=\"top\">\r\n        <td align=\"right\" class=\"row\" width=\"30%\">Poll Question: </td> \r\n        <td align=\"left\" class=\"row\"><input type=\"text\" class=\"inputbox\" name=\"pollq\" id=\"pollq\" style=\"width:60%\" size=\"255\" {if \$poll.pollq != \"\"}value=\"{\$poll.pollq}\"{/if}/><input type=\"hidden\" name=\"numopt\" id=\"numopt\" value=\"{\$numopts}\" /></td>\r\n    </tr>\r\n    {section name=options loop=\$numopts+1}\r\n    <tr valign=\"top\">\r\n        <td align=\"right\" class=\"row\">Poll Option: </td>\r\n        <td align=\"left\" class=\"row\"><input type=\"text\" class=\"inputbox\" name=\"poll{\$smarty.section.options.index}\" id=\"poll{\$smarty.section.options.index}\"  style=\"width:60%\" size=\"255\" {if \$poll.pollopts[options] != \"\"}value=\"{\$poll.pollopts[options]}\"{/if}/>{if \$smarty.section.options.index == \$numopts} <input type=\"submit\" class=\"button\" name=\"addpoll\" id=\"addpoll\" value=\"Add Option\" />{/if}</td>\r\n    </tr>\r\n    {/section}\r\n		<tr valign=\"baseline\">\r\n		  <td  align=\"right\" class=\"row\">Date to stop poll (Leave blank to run the poll forever):</td>\r\n		  <td align=\"left\" class=\"row\"><input name=\"sdate\" id=\"sdate\" type=\"text\" size=\"20\" maxlength=\"20\" value=\"{\$poll.stopdate}\" class=\"inputbox\" /><button id=\"opencal\" name=\"opencal\" class=\"button\">...</button>\r\n            </td>\r\n		</tr>\r\n        {if \$auth.sideboxpoll == 1}\r\n        <tr valign=\"baseline\">\r\n		  <td  align=\"right\" class=\"row\">Show poll in sidebox:</td>\r\n		  <td align=\"left\" class=\"row\"><input type=\"radio\" name=\"sidebox\" value=\"1\" {if \$poll.sidebox == 1}checked=\"checked\"{/if} />Yes <input type=\"radio\" name=\"sidebox\" value=\"0\" {if \$poll.sidebox == 0}checked=\"checked\"{/if} />No{if \$sideboxpoll.question != \"\"} (Current Sidebox Poll: {\$sideboxpoll.question}){/if}\r\n            </td>\r\n		</tr>\r\n        {/if}\r\n <tr>\r\n <td colspan=\"2\" class=\"row\" align=\"center\">\r\n  <span style=\"text-align:center\"><input type=\"submit\" name=\"submit\" value=\"Submit\" class=\"button\" />&nbsp;<input type=\"reset\" name=\"reset\" value=\"Cancel\" class=\"button\" onclick=\"window.location=''index.php?page=mythings''\" /></span>\r\n </td>\r\n </tr>\r\n</table>\r\n    <script type=\"text/javascript\">\r\n  {literal}\r\n  Calendar.setup(\r\n    {\r\n      inputField  : \"sdate\",         // ID of the input field\r\n      ifFormat    : \"%Y-%m-%d\",    // the date format\r\n      button      : \"opencal\",       // ID of the button\r\n      {/literal}\r\n      date: \"{\$stopdate|date_format:\"%Y-%m-%d\"}\"\r\n      {literal}\r\n    }\r\n  );\r\n  {/literal}\r\n</script>   ', 56);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (31, 1, '	<h1>Website Polls</h1>\r\n{if \$numpolls > 0} \r\n		<table border=\"0\" cellspacing=\"1\" cellpadding=\"3\" class=\"table\" width = \"100%\">\r\n		  <tr>\r\n			<th>Poll Question</th>\r\n			<th>Date Poll Closes</th>\r\n		  </tr>\r\n		{section name=poll loop=\$numpolls}\r\n			 <tr>\r\n				<td class=\"row\"><a href=\"index.php?page=polls&amp;id={\$polls[poll].id}\">{\$polls[poll].question}</a></td>\r\n				<td class=\"row\">{if \$polls[poll].date_stop != 0}{\$polls[poll].date_stop+\$timeoffset|date_format_pretty:false}{else}Poll doesn''t expire{/if}</td>\r\n		   </tr>\r\n		 {/section}\r\n		</table>\r\n {else}\r\n <div align=\"center\">There are no polls</div>\r\n{/if}', 58);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (31, 2, '{if \$numpollitems > 0}\r\n<table width=\"60%\" cellspacing=\"1\" cellpadding=\"1\" align=\"center\">\r\n<tr>\r\n <td align=\"center\"><h2>Poll</h2></td>\r\n </tr>\r\n<tr>\r\n <td align=\"center\"><h3>Question: <strong>{\$mainpagepoll.question}</strong></h3> {if \$mainpagevoted != true && \$mainpageshowresult != true && \$mainexpired == false}<form name=\"form1\" action=\"{\$mainpollpage}\" method=\"POST\">{/if}</td>\r\n </tr>\r\n {if \$mainpagevoted != true && \$mainpageshowresult != true && \$mainexpired == false}\r\n {section name=poll loop=\$nummainpollitems}\r\n <tr>\r\n  <td align=\"center\"><input type=\"radio\" name=\"mainpoll\" value=\"{\$mainpagepollitem[poll].id}\" />{\$mainpagepollitem[poll].value}</td>\r\n </tr>\r\n {/section}\r\n {else}\r\n  {section name=poll loop=\$nummainpollitems}\r\n <tr>\r\n  <td align=\"center\">{\$mainpagepollitem[poll].value}: <img src=\"bar.php?rating={math equation=\"(x / y) * 100\" x=\$mainpagepollitem[poll].results y=\$mainpagetotalvotes format=\"%.2f\"}&amp;width=200&amp;red={\$templateinfo.red}&amp;blue={\$templateinfo.blue}&amp;green={\$templateinfo.green}\" alt=\"{\$mainpagepollitem[poll].results}/{\$mainpagetotalvotes}\" /> {if \$mainpagetotalvotes > 0}({math equation=\"(x / y) * 100\" x=\$mainpagepollitem[poll].results y=\$mainpagetotalvotes format=\"%.2f\"}%){/if}</td>\r\n </tr>\r\n {/section}\r\n {/if}\r\n {if \$mainpagevoted != true && !\$mainexpired}\r\n <tr>\r\n <td align=\"center\">{if \$mainpagevoted != true && \$mainpageshowresult != true}<input type=\"submit\" value=\"Vote\" class=\"button\" name=\"mainpollvote\" id=\"mainpollvote\" /><br /><input type=\"button\" value=\"View Results\" class=\"button\" id=\"view\" onclick=\"window.location=''{\$pollpage}&sideview=1''\" /></form>{elseif \$mainpageshowresult == true && \$mainpagevoted != true && \$expired == false}<input type=\"button\" value=\"Vote\" class=\"button\" id=\"vote\" onclick=\"window.location=''{\$pollpage}''\" />{/if}</td>\r\n </tr>\r\n {elseif \$mainpagevoted == true && \$usersname != \"Guest\" && \$mainexpired == false}\r\n  <tr>\r\n <td align=\"center\">Thank you for voting</td>\r\n </tr>\r\n {elseif \$usersname == \"Guest\" && \$expired == false}\r\n   <tr>\r\n <td align=\"center\">You need to login to vote</td>\r\n </tr>\r\n {else}\r\n   <tr>\r\n <td align=\"center\">This poll is closed</td>\r\n </tr>\r\n {/if}\r\n {if \$mainexpired == false && \$mainpagepoll.date_stop != '''' && \$mainpagepoll.date_stop != 0}\r\n    <tr>\r\n <td align=\"center\">Poll closes: {\$mainpagepoll.date_stop|date_format}</td>\r\n </tr>\r\n {/if}\r\n     <tr>\r\n <td align=\"center\">Votes: {\$mainpagetotalvotes}</td>\r\n </tr>\r\n <tr>\r\n <td align=\"center\">\r\n <a href=\"index.php?page=polls\">Back to all polls</a>\r\n </td>\r\n </tr>\r\n </table>\r\n {else}\r\n <div align=\"center\">There are no items in this poll</div>\r\n{/if}', 59);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (32, 1, '{if \$rss == 0 && \$uname != \"Guest\"}<a href=\"index.php?page=rss&amp;action=add&amp;type=2&amp;id={\$patrol}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}rss_add.png\" alt=\"Add to RSS feed\" title=\"Add to RSS feed\" /></a>&nbsp;{elseif \$rss == 1 && \$uname != \"Guest\"}<a href=\"index.php?page=rss&amp;action=delete&amp;type=2&amp;id={\$patrol}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}rss_delete.png\" alt=\"Remove from RSS feed\" title=\"Remove from RSS feed\" /></a>&nbsp;{/if}\r\n{if \$limit> 0}\r\n<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\" class=\"table\">\r\n        <tr>\r\n  <td class=\"row\" align=\"right\" colspan=\"6\">\r\n      <div style=\"text-align:center\">\r\n    {if \$prev}\r\n        <a href=\"index.php?page=patrolpages&amp;patrol={\$patrol}&amp;content=patrollog&amp;start={\$prev_start}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}prev.png\" alt=\"Previous Page\" title=\"Previous Page\" /></a>\r\n    {/if}\r\n    {if \$numpages > 6}\r\n        {if \$currentpage == 1 || \$currentpage == \$numpages}\r\n            {section name=pages loop=3}\r\n                {if \$currentpage != \$smarty.section.pages.iteration}\r\n                    <a href=\"index.php?page=patrolpages&amp;patrol={\$patrol}&amp;content=patrollog&amp;start={\$num_per_page*\$smarty.section.pages.index}&amp;menuid={\$menuid}\">\r\n                {else}\r\n                    <span class=\"currpage\">\r\n                {/if}{\$smarty.section.pages.iteration}{if \$currentpage != \$smarty.section.pages.iteration}</a>{else}</span>{/if}\r\n            {/section}   \r\n....            \r\n            {section name=pages loop=\$numpages+1 start=\$numpages-2}\r\n                {if \$currentpage != \$smarty.section.pages.index}\r\n                    <a href=\"index.php?page=patrolpages&amp;patrol={\$patrol}&amp;content=patrollog&amp;start={\$num_per_page*\$smarty.section.pages.index-\$num_per_page}&amp;menuid={\$menuid}\">\r\n                {else}\r\n                    <span class=\"currpage\">\r\n                {/if}{\$smarty.section.pages.index}{if \$currentpage != \$smarty.section.pages.index}</a>{else}</span>{/if}\r\n            {/section}        \r\n        {else}\r\n            <a href=\"index.php?page=patrolpages&amp;patrol={\$patrol}&amp;content=patrollog&amp;start=0&amp;menuid={\$menuid}\">1<a/>{if \$currentpage != 2 && \$currentpage != 3 && \$currentpage != 4}....{/if}     \r\n            {section name=pages loop=\$currentpage+3 start=\$currentpage-2}\r\n                {if !(\$smarty.section.pages.index <= 1) && !(\$smarty.section.pages.index >= \$numpages)}\r\n                {if \$currentpage != \$smarty.section.pages.index}\r\n                    <a href=\"index.php?page=patrolpages&amp;patrol={\$patrol}&amp;content=patrollog&amp;start={\$num_per_page*\$smarty.section.pages.index-\$num_per_page}&amp;menuid={\$menuid}\">\r\n                {else}\r\n                    <span class=\"currpage\">\r\n                {/if}{\$smarty.section.pages.index}{if \$currentpage != \$smarty.section.pages.index}</a>{else}</span>{/if}{/if}\r\n            {/section}\r\n            {if \$currentpage != \$numpages-1 && \$currentpage != \$numpages-2 && \$currentpage != \$numpages-3}....{/if}<a href=\"index.php?page=patrolpages&amp;patrol={\$patrol}&amp;content=patrollog&amp;start={\$num_per_page*\$numpages-\$num_per_page}&amp;menuid={\$menuid}\">{\$numpages}<a/>\r\n        {/if}\r\n    {else}\r\n    {section name=pages loop=\$numpages}\r\n        {if \$currentpage != \$smarty.section.pages.iteration}\r\n            <a href=\"index.php?page=patrolpages&amp;patrol={\$patrol}&amp;content=patrollog&amp;start={\$num_per_page*\$smarty.section.pages.index}&amp;menuid={\$menuid}\">\r\n        {else}\r\n            <span class=\"currpage\">\r\n        {/if}{\$smarty.section.pages.iteration}{if \$currentpage != \$smarty.section.pages.iteration}</a>{else}</span>{/if}\r\n    {/section}\r\n    {/if}\r\n    {if \$next}\r\n        <a href=\"index.php?page=patrolpages&amp;patrol={\$patrol}&amp;content=patrollog&amp;start={\$next_start}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}next.png\" alt=\"Next Page\" title=\"Next Page\" /></a>\r\n    {/if}\r\n    </div>\r\n  </td>\r\n  </tr>\r\n  {section name=logbook loop=\$limit}	\r\n			<tr>\r\n			<td class=\"row\">\r\n                <div align=\"center\"><h3>{\$logbook[logbook].title}</h3></div>\r\n                <div align=\"left\" class=\"smalltext\">\r\n                Date Posted: <strong>{\$logbook[logbook].dateposted+\$timeoffset|date_format_pretty}</strong><br />\r\n                Username: <img {if \$logbook[logbook].userstatus == \"offline\"}src=\"{\$templateinfo.imagedir}offline.png\"{elseif \$logbook[logbook].userstatus == \"online and active\"}src=\"{\$templateinfo.imagedir}active.png\"{else}src=\"{\$templateinfo.imagedir}inactive.png\"{/if} alt=\"{\$logbook[logbook].userstatus}\" /><strong>{if \$uname != \"Guest\"}<a href=\"index.php?page=profile&amp;action=view&amp;user={\$logbook[logbook].uname}\" title=\"View User Profile\">{\$logbook[logbook].uname}</a>{else}{\$logbook[logbook].uname}{/if}</strong>\r\n                </div>\r\n				<div align=\"left\">{\$logbook[logbook].itemdetails|bbcode2html}</div>\r\n			</td>\r\n			</tr>\r\n		{/section}\r\n        <tr>\r\n  <td class=\"row\" align=\"right\" colspan=\"6\">\r\n  \r\n      <div style=\"text-align:center\">\r\n    {if \$prev}\r\n        <a href=\"index.php?page=patrolpages&amp;patrol={\$patrol}&amp;content=patrollog&amp;start={\$prev_start}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}prev.png\" alt=\"Previous Page\" title=\"Previous Page\" /></a>\r\n    {/if}\r\n    {if \$numpages > 6}\r\n        {if \$currentpage == 1 || \$currentpage == \$numpages}\r\n            {section name=pages loop=3}\r\n                {if \$currentpage != \$smarty.section.pages.iteration}\r\n                    <a href=\"index.php?page=patrolpages&amp;patrol={\$patrol}&amp;content=patrollog&amp;start={\$num_per_page*\$smarty.section.pages.index}&amp;menuid={\$menuid}\">\r\n                {else}\r\n                    <span class=\"currpage\">\r\n                {/if}{\$smarty.section.pages.iteration}{if \$currentpage != \$smarty.section.pages.iteration}</a>{else}</span>{/if}\r\n            {/section}   \r\n....            \r\n            {section name=pages loop=\$numpages+1 start=\$numpages-2}\r\n                {if \$currentpage != \$smarty.section.pages.index}\r\n                    <a href=\"index.php?page=patrolpages&amp;patrol={\$patrol}&amp;content=patrollog&amp;start={\$num_per_page*\$smarty.section.pages.index-\$num_per_page}&amp;menuid={\$menuid}\">\r\n                {else}\r\n                    <span class=\"currpage\">\r\n                {/if}{\$smarty.section.pages.index}{if \$currentpage != \$smarty.section.pages.index}</a>{else}</span>{/if}\r\n            {/section}        \r\n        {else}\r\n            <a href=\"index.php?page=patrolpages&amp;patrol={\$patrol}&amp;content=patrollog&amp;start=0&amp;menuid={\$menuid}\">1<a/>{if \$currentpage != 2 && \$currentpage != 3 && \$currentpage != 4}....{/if}     \r\n            {section name=pages loop=\$currentpage+3 start=\$currentpage-2}\r\n                {if !(\$smarty.section.pages.index <= 1) && !(\$smarty.section.pages.index >= \$numpages)}\r\n                {if \$currentpage != \$smarty.section.pages.index}\r\n                    <a href=\"index.php?page=patrolpages&amp;patrol={\$patrol}&amp;content=patrollog&amp;start={\$num_per_page*\$smarty.section.pages.index-\$num_per_page}&amp;menuid={\$menuid}\">\r\n                {else}\r\n                    <span class=\"currpage\">\r\n                {/if}{\$smarty.section.pages.index}{if \$currentpage != \$smarty.section.pages.index}</a>{else}</span>{/if}{/if}\r\n            {/section}\r\n            {if \$currentpage != \$numpages-1 && \$currentpage != \$numpages-2 && \$currentpage != \$numpages-3}....{/if}<a href=\"index.php?page=patrolpages&amp;patrol={\$patrol}&amp;content=patrollog&amp;start={\$num_per_page*\$numpages-\$num_per_page}&amp;menuid={\$menuid}\">{\$numpages}<a/>\r\n        {/if}\r\n    {else}\r\n    {section name=pages loop=\$numpages}\r\n        {if \$currentpage != \$smarty.section.pages.iteration}\r\n            <a href=\"index.php?page=patrolpages&amp;patrol={\$patrol}&amp;content=patrollog&amp;start={\$num_per_page*\$smarty.section.pages.index}&amp;menuid={\$menuid}\">\r\n        {else}\r\n            <span class=\"currpage\">\r\n        {/if}{\$smarty.section.pages.iteration}{if \$currentpage != \$smarty.section.pages.iteration}</a>{else}</span>{/if}\r\n    {/section}\r\n    {/if}\r\n    {if \$next}\r\n        <a href=\"index.php?page=patrolpages&amp;patrol={\$patrol}&amp;content=patrollog&amp;start={\$next_start}&amp;menuid={\$menuid}\"><img border=\"0\" src=\"{\$templateinfo.imagedir}next.png\" alt=\"Next Page\" title=\"Next Page\" /></a>\r\n    {/if}\r\n    </div>\r\n  </td>\r\n  </tr>\r\n </table>\r\n{if \$addable}\r\n<a href=\"index.php?page=patrolpages&amp;patrol={\$patrol}&amp;content=patrollog&amp;action=add\">Click here to add a entry</a>\r\n{/if}\r\n{else}\r\n<div>No log entries yet<br />\r\n{if \$addable}\r\n<a href=\"index.php?page=patrolpages&amp;patrol={\$patrol}&amp;content=patrollog&amp;action=add\">Click here to add a entry</a>\r\n{/if}</div>\r\n{/if}', 60);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (32, 2, '<form action=\"{\$postaction}\" method=\"post\" name=\"posttopic\">\r\n<table width=\"100%\" cellspacing=\"1\" cellpadding=\"2\" class=\"table\">\r\n <tr>\r\n  <th class=\"bighead\" colspan=\"2\">Add entry to group log</th>\r\n </tr>\r\n <tr>\r\n  <td class=\"row\" width=\"20%\">\r\n    <div align=\"right\">Title:</div>\r\n  </td>\r\n  <td class=\"row\">\r\n    <input type=\"text\" style=\"width:100%\" size=\"255\" class=\"inputbox\" name=\"title\" id=\"title\"  />\r\n  </td>\r\n </tr>\r\n  <tr>\r\n  <td class=\"row\" width=\"20%\">\r\n    <div align=\"right\">Make entry visible to group members only?</div>\r\n  </td>\r\n<td class=\"row\">\r\n		    <input type=\"radio\" name=\"private\" value=\"1\" class=\"inputbox\" />Yes\r\n		    <input type=\"radio\" name=\"private\" value=\"0\" class=\"inputbox\" checked=\"checked\" />No\r\n	      </td>\r\n </tr>\r\n  <tr>\r\n  <td class=\"row\" valign=\"top\">\r\n    <div align=\"right\">Log Entry:<br />You can use <a href=\"javascript:popuphelp(''bbcode'')\">BBCode</a></div>\r\n  </td>\r\n    <td><textarea style=\"width:100%\" rows=\"30\" name=\"story\" id=\"story\" class=\"inputbox\"></textarea></td>\r\n </tr>\r\n <tr>\r\n <td colspan=\"2\" class=\"row\" align=\"center\">\r\n  <span style=\"text-align:center\"><input type=\"submit\" name=\"submit\" value=\"Submit\" class=\"button\" />&nbsp;<input type=\"reset\" name=\"reset\" value=\"Cancel\" class=\"button\" onclick=\"window.location=''{if !\$new}index.php?page=forums&amp;action=topic&amp;t={\$topic.id}&amp;menuid={\$menuid}{else}index.php?page=forums&amp;f={\$forum.id}&amp;menuid={\$menuid}{/if}''\" /></span>\r\n </td>\r\n </tr>\r\n</table>\r\n</form>', 61);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (33, 1, '<table width=\"50%\" class=\"table\" align=\"center\">\r\n<tr>\r\n<th colspan=\"2\" class=\"bighead\">General Site Statistics</th>\r\n</tr>\r\n<tr>\r\n<td class=\"row\" align=\"right\" width=\"50%\">Registered Users:</td><td class=\"row\" align=\"left\">{\$statspage.site.numusers}</td>\r\n</tr>\r\n<tr>\r\n<td class=\"row\" align=\"right\" width=\"50%\">Photo Albums:</td><td class=\"row\" align=\"left\">{\$statspage.site.albums}</td>\r\n</tr>\r\n<tr>\r\n<td class=\"row\" align=\"right\" width=\"50%\">Photos:</td><td class=\"row\" align=\"left\">{\$statspage.site.photos}</td>\r\n</tr>\r\n<tr>\r\n<td class=\"row\" align=\"right\" width=\"50%\">Articles:</td><td class=\"row\" align=\"left\">{\$statspage.site.articles}</td>\r\n</tr>\r\n<tr>\r\n<td class=\"row\" align=\"right\" width=\"50%\">Content Pages:</td><td class=\"row\" align=\"left\">{\$statspage.site.pages}</td>\r\n</tr>\r\n<tr>\r\n<td class=\"row\" align=\"right\" width=\"50%\">Article Comments:</td><td class=\"row\" align=\"left\">{\$statspage.site.comments}</td>\r\n</tr>\r\n<tr>\r\n<td class=\"row\" align=\"right\" width=\"50%\">Forum Topics:</td><td class=\"row\" align=\"left\">{\$statspage.site.topics}</td>\r\n</tr>\r\n<tr>\r\n<td class=\"row\" align=\"right\" width=\"50%\">Forum Posts:</td><td class=\"row\" align=\"left\">{\$statspage.site.posts}</td>\r\n</tr>\r\n{section loop=\$numgroups name=group}\r\n<tr>\r\n<th colspan=\"2\" class=\"bighead\">Statistics for <a href=\"index.php?page=patrolpages&amp;patrol={\$statspage[group].name}&amp;menuid={\$menuid}\">{\$statspage[group].name}</a></th>\r\n</tr>\r\n<tr>\r\n<td class=\"row\" align=\"right\" width=\"50%\">Users:</td><td class=\"row\" align=\"left\">{\$statspage[group].numusers}</td>\r\n</tr>\r\n<tr>\r\n<td class=\"row\" align=\"right\" width=\"50%\">Photo Albums:</td><td class=\"row\" align=\"left\">{\$statspage[group].albums}</td>\r\n</tr>\r\n<tr>\r\n<td class=\"row\" align=\"right\" width=\"50%\">Photos:</td><td class=\"row\" align=\"left\">{\$statspage[group].photos}</td>\r\n</tr>\r\n<tr>\r\n<td class=\"row\" align=\"right\" width=\"50%\">Articles:</td><td class=\"row\" align=\"left\">{\$statspage[group].articles}</td>\r\n</tr>\r\n<tr>\r\n<td class=\"row\" align=\"right\" width=\"50%\">Content Pages:</td><td class=\"row\" align=\"left\">{\$statspage[group].pages}</td>\r\n</tr>\r\n<tr>\r\n<td class=\"row\" align=\"right\" width=\"50%\">Article Comments:</td><td class=\"row\" align=\"left\">{\$statspage[group].comments}</td>\r\n</tr>\r\n<tr>\r\n<td class=\"row\" align=\"right\" width=\"50%\">Forum Topics:</td><td class=\"row\" align=\"left\">{\$statspage[group].topics}</td>\r\n</tr>\r\n<tr>\r\n<td class=\"row\" align=\"right\" width=\"50%\">Forum Posts:</td><td class=\"row\" align=\"left\">{\$statspage[group].posts}</td>\r\n</tr>\r\n{/section}\r\n</table>', 62);";
$sql[] = "INSERT INTO `{$database['prefix']}pagecontent` (`pageid`, `pagenum`, `content`, `id`) VALUES (34, 1, '{if \$numevents > 0}\r\n<table width=\"100%\" class=\"table\">\r\n<tr>\r\n<th class=\"bighead\" colspan=\"{\$numattendusers+1}\">Attendance Register</th>\r\n</tr>\r\n<tr>\r\n<th class=\"smallhead\" width=\"15%\"></th>\r\n{section name=users loop=\$numattendusers}\r\n<th class=\"smallhead\" width=\"10%\">{if \$firstnameview == true}<a href=\"index.php?page=profile&action=view&user={\$attenduserlist[users].uname}\">{\$attenduserlist[users].name}</a>{else}{\$attenduserlist[users].uname}{/if}</th>\r\n{/section}\r\n</tr>\r\n{section name=events loop=\$numevents}\r\n<tr>\r\n<th class=\"smallhead\">{\$attendance[events].name}{if \$attendance[events].date != 0}<br /><span class=\"comment\">{\$attendance[events].date+\$timeoffset|date_format:\"%B %e %Y\"}</span>{/if}</th>\r\n{section name=users loop=\$numattendusers}\r\n<td class=\"row\"><div align=\"center\">{if \$attendance[events].userlist[users].attend == 1}<img src=\"{\$templateinfo.imagedir}published.png\" border=\"0\" alt=\"Attended\" title=\"Attended\" />{else}<img src=\"{\$templateinfo.imagedir}notpublished.png\" border=\"0\" alt=\"Not Attended\" title=\"Not Attended\" />{/if}</div></th>\r\n{/section}\r\n</tr>\r\n{/section}\r\n</table>\r\n{else}\r\nNo attendance register information\r\n{/if}', 63);";

$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (1, 'photoalbum', 2);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (2, 'patrolinfo', 1);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (3, 'patrolarticle', 1);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (4, 'profile', 2);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (5, 'record', 1);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (6, 'addarticle', 1);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (8, 'addalbum', 1);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (9, 'register', 5);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (10, 'calender', 1);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (11, 'downloads', 1);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (13, 'search', 1);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (14, 'Help', 1);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (17, 'mythings', 10);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (18, 'forgot', 1);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (19, 'mypatrol', 1);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (20, 'oldnews', 1);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (21, 'points', 1);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (22, 'addevent', 1);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (23, 'newsitem', 1);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (24, 'forums', 10);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (25, 'pm', 6);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (26, 'logon', 1);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (27, 'advancements', 1);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (28, 'linksdata', 1);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (29, 'addpoll', 1);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (31, 'polls', 2);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (32, 'patrollog', 2);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (33, 'statistics', 1);";
$sql[] = "INSERT INTO `{$database['prefix']}pagetracking` (`id`, `pagename`, `numpages`) VALUES (34, 'attendance', 1);";

$sql[] = "INSERT INTO `{$database['prefix']}themes` (`id`, `name`, `dir`, `configfile`) VALUES (2, 'Generic Scouts', 'Scouting', 'scouts.cfg');";
$sql[] = "INSERT INTO `{$database['prefix']}themes` (`id`, `name`, `dir`, `configfile`) VALUES (1, 'CMScout 2', 'cmscout2', 'cmscout.cfg');";

$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (1, 0.0);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (2, 1.0);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (3, 2.0);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (4, 3.0);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (5, 4.0);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (6, 5.0);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (7, 6.0);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (8, 7.0);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (9, 8.0);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (10, 9.0);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (11, 10.0);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (12, 11.0);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (13, 12.0);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (14, -11.0);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (15, -10.0);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (16, -9.0);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (17, -8.0);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (18, -7.0);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (19, -6.0);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (20, -5.0);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (21, -4.0);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (22, -3.0);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (23, -2.0);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (24, -1.0);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (26, 3.5);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (27, 5.5);";
$sql[] = "INSERT INTO `{$database['prefix']}timezones` (`id`, `offset`) VALUES (28, 9.5);";

$sql[] = "INSERT INTO `{$database['prefix']}authuser` (`id`, `uid`, `uname`, `passwd`, `status`, `level`, `team`, `joined`, `lastlogin`, `prevlogin`, `logincount`, `theme_id`, `timezone`) VALUES (1, '', {$admin['name']}, {$admin['password']}, '1', 0, 'Admin', $timestamp, 0, 0, 0, 1, 1);";

$sql[] = "INSERT INTO `{$database['prefix']}records` (`id`, `firstname`, `lastname`, `dob`, `tel`, `cell`, `address`, `email`, `uname`, `avyfile`, `sig`, `newtopic`, `allowemail`, `newpm`, `scheme`, `troopuser`, `numposts`, `publicprofile`, `numtopics`, `numalbums`, `numphotos`, `numarticles`, `numnews`, `numdown`, `numevent`, `showemail`, `showname`, `showdob`, `showrecord`, `newcontent`) VALUES (1, '', '', '2006-02-08', NULL, NULL, NULL, {$admin['email']}, {$admin['name']}, '', NULL, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1);";

?>